[opencms-dev] German Umlauts in cms.readFile()

Uwe König u.koenig at ifu.com
Wed May 3 16:52:55 CEST 2006




Hello Joe, 

> Could you send me a sample file and I'll see if I can reproduce the
> problem at my end. Eg some short text in UTF-8. Maybe ZIP that up so
> that the encoding is not interfered with.

please see the file attached, most umlauts are HTML-escaped, but some are not to reproduce the error. 

The code I use looks like: 

	CmsObject cms = th.getCmsObject();
    	String WIKI_ARTICLE_LIST = "/resources/" + th.getCurrentLanguage() + "/wikiarticles.txt";			
	CmsFile wikiConfig = cms.readFile(WIKI_ARTICLE_LIST);
	String content = new String(wikiConfig.getContents());

The content I receive seems to be neither ISO-8859-1 nor UTF-8. 
My environment is: 

OpenCMS 6.0.3
latest Tomcat 5.5
latest JDK 1.5
MySQL 4.0.24

In the /WEB-INF/config/, a 

grep -i encoding * 

shows up no other than UTF-8. 

Thanks for your help! 
Best regards, 

Uwe König 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wikiarticles.zip
Type: application/zip
Size: 270 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060503/051031a7/attachment.zip>


More information about the opencms-dev mailing list