Tag Archives: encoding

Getting encoding type of a XML in java

Questions: I am parsing XML using DocumentBuilder in java 1.4. XML has first line as xml version=”1.0″ encoding=”GBK” I want to get encoding type of the XML and use it. How can I get “GBK” Basically i will be making one more XML where i want encoding=”GBK” to be retained. Currently it is getting lost… Read More »

Apache mod_proxy content-length vs chunked encoding

Questions: I have apache configured to proxy for a (old, creaky, and basically http 1.0) web server that does not deliver a content-length header, just relying on closing the connection to mark end of data. Under apache 2.2, mod_proxy handled this by using Transfer-Encoding: chunked, and then delivering the data as fast as the remote… Read More »

Edit .XML file with Powershell, encoding

Questions: I need to edit a .xml file with powershell. The thing I need to do is to download the .xml file from the server, updated the version number, and then save it in my local computer. This is what I did. [xml]$myXML = get-content $xmlFileServer $myXML.’ivy-module’.info.revision = $newVersion $myXML.Save($newXMLFileName) Then I will have a… Read More »

Eclipse-RCP Wrong encoding when deploying the product

Questions: I am creating an RCP application, with many Greek messages, so everything is in UTF-8. As I develop and test through Eclipse IDE, everything is fine. When I am deploying through “Eclipse Product export Wizard” the resulting exe does not correctly display the Greek letters. I know that I am missing something stupid, but… Read More »

utf8 without BOM encoding in eclipse

Questions: After some headache I figured out that eclipse using set encoding UTF8 (with BOM) causes an error. It causes whitespace to be added when you use an include causing the headers of a webpage to render within the body in chrome. ie. on index.php with no gap before or after the of course <?php… Read More »

Javadoc error: unmappable character for encoding ASCII

Questions: Im trying to create a Javadoc but i can’t. I have written my comments in swedish så they content charachters as å,ä,ö. This is giving me over 248 erros. Is there a way to change the encoding for the whole Project? I have tried: Right-clicked on the project Choosed Resource Change to UTF-8 Restarted… Read More »

What is the default encoding of the JVM?

Questions: Is UTF-8 the default encoding in Java? If not, how can I know which encoding is used by default? Answers: The default character set of the JVM is that of the system it’s running on. There’s no specific value for this and you shouldn’t generally depend on the default encoding being any particular value.… Read More »

Add windows encoding to Eclipse on linux

Questions: I have a legacy project which has all the source files, templates, properties written in cp1250 encoding. (Windows 1250 – central european). Recently I switched from Windows to Ubuntu and found out, that fresh installation of Eclipse 3.5 doesn’t have cp1250 in neither project properties nor workspace settings. How do I install new encoding… Read More »

Java properties UTF-8 encoding in Eclipse

Questions: I’ve recently had to switch encoding of webapp I’m working on from ISO-xx to utf8. Everything went smooth, except properties files. I added -Dfile.encoding=UTF-8 in eclipse.ini and normal files work fine. Properties however show some strange behaviour. If I copy utf8 encoded properties from Notepad++ and paste them in Eclipse, they show and work… Read More »