[jboss-jira] [JBoss JIRA] Commented: (JBPORTAL-832) CMS saves pages in native encoding (ISO-8859-1 or Cp1251) but retrieve it in UTF-8. then national leters are damaged

Kirill Vodonosov (JIRA) jira-events at lists.jboss.org
Thu Mar 22 08:38:36 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBPORTAL-832?page=comments#action_12356981 ] 
            
Kirill Vodonosov commented on JBPORTAL-832:
-------------------------------------------

Error in file \core-cms\src\main\org\jboss\portal\core\cms\ui\admin\CMSAdminPortlet.java
for JBoss Portal 2.6 beta 1 change:
-----------------------------------------------------------------------------------------------------------------------
from:

               content.setBasePath(sFilePath + "/" + new Locale(sLanguage).getLanguage());
               content.setBytes(sContent.getBytes());
               file.setContent(new Locale(sLanguage), content);
-----------------------------------------------------------------------------------------------------------------------

to:
               content.setBasePath(sFilePath + "/" + new Locale(sLanguage).getLanguage());
               try {
                 content.setBytes(sContent.getBytes("UTF-8"));
               }
               catch (Exception e)
               {
                  throw new PortletException(e);
               }
               file.setContent(new Locale(sLanguage), content);


> CMS saves pages in native encoding (ISO-8859-1 or Cp1251) but retrieve it in UTF-8. then national leters are damaged
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBPORTAL-832
>                 URL: http://jira.jboss.com/jira/browse/JBPORTAL-832
>             Project: JBoss Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Portal CMS
>         Environment: jboss4.0.3sp1
>            Reporter: Mike Khlu
>         Assigned To: Sohil Shah
>         Attachments: ??????? ? ???-??? ???????.PNG, issue-screenshot.GIF, jbossportali18nbug.GIF, russian-in-1251.txt, russian-in-utf8.html
>
>
> When I input ru-characters in the text area it has been puted into table in native encoding (cp1251) - !!! not UTF-8. But pages are sends in UTF-8, and it damaged.
> I think that I have to encode the request in UTF-8 ??? 
> ---------------------------------------------
>  create file.html in Ru (in cms admin) with this text
> abc???
> then look at the last record of JBP_CMS_VERSION_BINVAL
> (six bytes in BINVAL_DATA field):
> 61 62 63 e0 e1 e2
> it is cp1251 encoding !!!!
> why this text non unicoded ???
> then when i retrive it i have - 'abc???'
> I think that problem isn't in ContentTypeInterceptor because it succefully
> sets UTF8, because localized resources seems right (in russian).
> may be it is need to store text in CLobs insdead blobs ??? (a use Derby) or customize Jackrabbit ???
> -----------------------------------------------------------
> but when I upload file on UTF-8 with russian characters - all correct.
> I think that cms saves the content in one byte encoding (cp1250 or same). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list