encoding

Runtime.exec() command with utf-8 characters

孤者浪人 提交于 2021-02-07 04:38:11
问题 I'm trying to execute Runtime.getRuntime().exec() command which contains polish characters. Command is cutted from the first polish letter. Instead of polish letter i'm getting "?". How can I set correct encoding to exec this command properly? Command which i'm using : execCommand("php /home/script/url param1 param2 param3) execCommand looks like : private String execCommand(String command) { String output=""; try { Process proc = Runtime.getRuntime().exec(command); BufferedReader read = new

What can cause git to mess with character encoding?

北慕城南 提交于 2021-02-06 07:59:56
问题 Edit: git does not mess with character encoding. This is still here to share knowlege and avoid others making the same mistake. The context : My enterprise uses an svn repository. I'm using git-svn as a client to interact with this repository. All text files in the project are (and must be) encoded with windows default encoding (cp-....). I use git-extensions, and sometimes the command line to pilot git. What I did : During the last 3 days, I was working on a new feature, and I did a number

What can cause git to mess with character encoding?

半城伤御伤魂 提交于 2021-02-06 07:57:09
问题 Edit: git does not mess with character encoding. This is still here to share knowlege and avoid others making the same mistake. The context : My enterprise uses an svn repository. I'm using git-svn as a client to interact with this repository. All text files in the project are (and must be) encoded with windows default encoding (cp-....). I use git-extensions, and sometimes the command line to pilot git. What I did : During the last 3 days, I was working on a new feature, and I did a number

Socket.io chat app that can also send image and even file

我怕爱的太早我们不能终老 提交于 2021-02-05 20:31:50
问题 I've been interested in the Socket.io project recently and I wonder if there's easy way to send image or even other type of files without having to use other library. I'm not trying to upload the file to the server to store, I just want to broadcast it to those who are in the chat room at that moment. So the code should be minimal. However I'm really bad at encoding/decoding stuff, so some example code would be great. 回答1: I've adapted the official chat example of Socket.io and added

Socket.io chat app that can also send image and even file

妖精的绣舞 提交于 2021-02-05 20:30:29
问题 I've been interested in the Socket.io project recently and I wonder if there's easy way to send image or even other type of files without having to use other library. I'm not trying to upload the file to the server to store, I just want to broadcast it to those who are in the chat room at that moment. So the code should be minimal. However I'm really bad at encoding/decoding stuff, so some example code would be great. 回答1: I've adapted the official chat example of Socket.io and added

SSIS: Code page goes back to 65001

房东的猫 提交于 2021-02-05 20:28:37
问题 In an SSIS package that I'm writing, I have a CSV file as a source. On the Connection Manager General page, it has 65001 as the Code page (I was testing something). Unicode is not checked. The columns map to a SQL Server destination table with varchar (among others) columns. There's an error at the destination: The column "columnname" cannot be processed because more than one code page (65001 and 1252) are specified for it. My SQL columns have to be varchar , not nvarchar due to other

SSIS: Code page goes back to 65001

ⅰ亾dé卋堺 提交于 2021-02-05 20:28:01
问题 In an SSIS package that I'm writing, I have a CSV file as a source. On the Connection Manager General page, it has 65001 as the Code page (I was testing something). Unicode is not checked. The columns map to a SQL Server destination table with varchar (among others) columns. There's an error at the destination: The column "columnname" cannot be processed because more than one code page (65001 and 1252) are specified for it. My SQL columns have to be varchar , not nvarchar due to other

SSIS: Code page goes back to 65001

亡梦爱人 提交于 2021-02-05 20:28:00
问题 In an SSIS package that I'm writing, I have a CSV file as a source. On the Connection Manager General page, it has 65001 as the Code page (I was testing something). Unicode is not checked. The columns map to a SQL Server destination table with varchar (among others) columns. There's an error at the destination: The column "columnname" cannot be processed because more than one code page (65001 and 1252) are specified for it. My SQL columns have to be varchar , not nvarchar due to other

Encoding issue with apache poi converter

我的未来我决定 提交于 2021-02-05 11:19:12
问题 I have an ms word doc file that i'm converting to an html document using apache poi. this is the code i'm running InputStream input = new FileInputStream (path); HWPFDocument wordDocument = new HWPFDocument (input); WordToHtmlConverter wordToHtmlConverter = new WordToHtmlConverter (DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument() ); List<Picture> pics = wordDocument.getPicturesTable().getAllPictures(); if (pics != null) { for (int i = 0; i <pics.size(); i++) { Picture

URL constructor doesn't work with some characters

◇◆丶佛笑我妖孽 提交于 2021-02-05 10:44:10
问题 I'm trying to call a php-script from my app using URLRequest. The Url path is generated in the String-Variable query and for the request I convert it like this guard let url = URL(string: query) else { print("error") return } usually it works, but when the request contains characters like ä, ö, ü, ß the error is triggered. How can I make it work? 回答1: The URL(string:) initializer doesn't take care of encoding the String to be a valid URL String , it assumes that the String is already encoded