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

Florian Hopf hopf at synyx.de
Wed May 3 17:27:51 CEST 2006


Hi,
> 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
>   
It might help if you use the option useUnicode=true for your DB
Connection. It is configured in config/opencms.properties.
See http://opencms-forum.de/viewtopic.php?t=1342 the last post.

HTH
Flo

-- 
/**
 * Florian Hopf
 * Synyx GmbH & Co. KG
 * phone  +49(0)721 9118303
 * eMail  hopf at synyx.de
 * www    http://www.synyx.de
 * irc    irc.synyx.de
 */




More information about the opencms-dev mailing list