[webERP -translation] Unicode problem

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[webERP -translation] Unicode problem

solomon hm
hello there am trying to translate weberp to my language which is
Amharic(am-ET). so i try to fallow all the necessary steps and use
utf8 since its unicode(ISO 639-1: am). but it returns  something like
" ትእዛዝ "  when i try to display " ትእዛዝ "

So what should i do?
*** am using Poedit on windows7 OS and also i am using OS built-in
unicode amharic fonts

with regards
solomon H

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Web-ERP-translation mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-translation
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

ExsonQu
Administrator
This post has NOT been accepted by the mailing list yet.
Hi, solomon:

         Is the wrong display appeared in your Poedit or in your weberp screen?
        If it's weberp screen, is part of texts translated by you can not display correctly? Did you adjust the Language and Character set in your web browser? What's the result after the adjustment?
       
       Best regards!
       Exson
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

dxxchung
This post has NOT been accepted by the mailing list yet.
In reply to this post by solomon hm
Before asking , please do the basic search.

Read my link:
       why big-5 charaters not displayed in purchases module  by  dxxchung

No one helped me me out with my printing problems.
I cant 't print out a purchase order. Do you guys have ptoblems with printing out basic reports or forms?


Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

Civicom.eu
In reply to this post by solomon hm
Hi Solomon

Regardless the incorrect renderization, " ትእዛዝ " is a 4 characters (glyphs)
string that is being rendered like " ትእዛዝ " which has 12 chars, what
means that the renderization is not using UTF-8 but a single byte charset,
i.e., each byte of the three of every char of the four chars of the string,
is being rendered like it was a single byte char:

4 chars x 3 bytes/each = 12 bytes, rendered at 1 byte/char = 12 chars.

So, the only thing is to review that every shackle in the chain (WebERP,
PhP, MySQL, Web Server, Client Browser) is using UTF-8.

For instance, for the browser to properly render Amharic web pages (like you
say it does already), it needs first an Unicode font with Amharic glyphs
like Geez Unicode, Washera, etc. If the OS did't get one (like it did) we
would need to get one at http://www.wazu.jp/gallery/Fonts_Ethiopic.html and
then follow the instructions at
http://www.ethiopianreporter.com/index.php?option=com_content&view=article&id=472&Itemid=653 
where also the jiret.ttf font is avaliable.

Once the browser is configured to render Amharic (like yours does), you may
test your server. In IE8, right click the page and look at codification to
see what codeset is being used, select "Unicode (UTF-8)" if not selected yet
to see if it render Amahric properly. In Firefox, right click and look the
last option "page information", it should show "text/html; charset=UTF-8" in
the white square (that shows meta tags).

If  FF doesn't show "charset=UTF-8" the problem is any of:

Web Server,  review its config (http.conf if Apache).
MySQL, use UTF-8 for your WebERP database.
PhP, please enable multibyte
WebERP, download and install a more recent version of WebERP

Sorry not being of more help, but please review PhP has multibyte enabled
and MySQL is using UTF-8 for your company database.
regards,
javier





----- Original Message -----
From: "solomon hm" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, June 15, 2010 11:14 PM
Subject: [webERP -translation] Unicode problem


> hello there am trying to translate weberp to my language which is
> Amharic(am-ET). so i try to fallow all the necessary steps and use
> utf8 since its unicode(ISO 639-1: am). but it returns  something like
> " ትእዛዝ "  when i try to display " ትእዛዝ "
>
> So what should i do?
> *** am using Poedit on windows7 OS and also i am using OS built-in
> unicode amharic fonts
>
> with regards
> solomon H
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Web-ERP-translation mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-translation
>


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Web-ERP-translation mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-translation
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

Civicom.eu
Hi Solomon and all

Forgot to say that PhP multybyte strings may be enabled in php.ini (maybe
you did know already).

Most probably would not be a bad idea to add this check to the WebERP GUI in
the page where it checks the system (SystemCheck.php). Something like:

if (!function_exists('mb_strlen')) {echo 'Unicode Library: Please install
PHP mbstring extension for improved Unicode support';}
else {echo 'Unicode Library: PhP mbstring extension installed.';}

and even checking mbconfig like:

if (ini_get('mbstring.func_overload') !=0) {echo 'Multibyte string function
overloading in PHP is active, maybe should be better disabling it';}
else {echo 'Mb funtion overload disabled OK';}

and the same for

ini_get ('mbstring.encoding_translation') !=0
ini_get ('mbstring.http.input') != 'pass'
ini_get ('mbstring.http.output') != 'pass'

or just simply tell the user to review his/her php.ini:

mbstring.language = Neutral; /* or uni */
mbstring.internal_encoding = UTF-8;

and invite him/her to look at http://www.php.net/mbstring


Regarding your string, let's take a closer look at your example string
ትእዛዝ

The original four chars are the following:

ት
እ
á‹›
ዝ

Note each one is started by "á", regardless its renderization (it was not
intended to be rendered) it is one of the 16 possible UTF-8 flags for the
first of every three bytes encoded chars, i.e, one among 1110xxxx, where the
first most meaningful three "1" mean that it is the first of a three bytes
character. The remaining two bytes of each char has the coding 10xxxxxx,
i.e., a three bytes, 24 bits, UTF-8 char, has 8 bits for flagging (along the
3 bytes, 4-2-2) and 16 bits for coding the chars (4-6-6).


Really hope this helps and let me encourage you to use Linux
javier de lorenzo-cáceres,
civicom.eu
Canary Islands



----- Original Message -----
From: "Civicom.eu" <[hidden email]>
To: "Discussion of webERP translation issues"
<[hidden email]>
Sent: Wednesday, June 16, 2010 8:07 AM
Subject: Re: [webERP -translation] Unicode problem


> Hi Solomon
>
> Regardless the incorrect renderization, " ትእዛዝ " is a 4 characters
> (glyphs)
> string that is being rendered like " ትእዛዝ " which has 12 chars,
> what
> means that the renderization is not using UTF-8 but a single byte charset,
> i.e., each byte of the three of every char of the four chars of the
> string,
> is being rendered like it was a single byte char:
>
> 4 chars x 3 bytes/each = 12 bytes, rendered at 1 byte/char = 12 chars.
>
> So, the only thing is to review that every shackle in the chain (WebERP,
> PhP, MySQL, Web Server, Client Browser) is using UTF-8.
>
> For instance, for the browser to properly render Amharic web pages (like
> you
> say it does already), it needs first an Unicode font with Amharic glyphs
> like Geez Unicode, Washera, etc. If the OS did't get one (like it did) we
> would need to get one at http://www.wazu.jp/gallery/Fonts_Ethiopic.html 
> and
> then follow the instructions at
> http://www.ethiopianreporter.com/index.php?option=com_content&view=article&id=472&Itemid=653
> where also the jiret.ttf font is avaliable.
>
> Once the browser is configured to render Amharic (like yours does), you
> may
> test your server. In IE8, right click the page and look at codification to
> see what codeset is being used, select "Unicode (UTF-8)" if not selected
> yet
> to see if it render Amahric properly. In Firefox, right click and look the
> last option "page information", it should show "text/html; charset=UTF-8"
> in
> the white square (that shows meta tags).
>
> If  FF doesn't show "charset=UTF-8" the problem is any of:
>
> Web Server,  review its config (http.conf if Apache).
> MySQL, use UTF-8 for your WebERP database.
> PhP, please enable multibyte
> WebERP, download and install a more recent version of WebERP
>
> Sorry not being of more help, but please review PhP has multibyte enabled
> and MySQL is using UTF-8 for your company database.
> regards,
> javier
>
>
>
>
>
> ----- Original Message -----
> From: "solomon hm" <[hidden email]>
> To: <[hidden email]>
> Sent: Tuesday, June 15, 2010 11:14 PM
> Subject: [webERP -translation] Unicode problem
>
>
>> hello there am trying to translate weberp to my language which is
>> Amharic(am-ET). so i try to fallow all the necessary steps and use
>> utf8 since its unicode(ISO 639-1: am). but it returns  something like
>> " ትእዛዝ "  when i try to display " ትእዛዝ "
>>
>> So what should i do?
>> *** am using Poedit on windows7 OS and also i am using OS built-in
>> unicode amharic fonts
>>
>> with regards
>> solomon H
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Web-ERP-translation mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/web-erp-translation
>>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Web-ERP-translation mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-translation
>


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Web-ERP-translation mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-translation
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

solomon hm
In reply to this post by Civicom.eu
first i like to thank you for ur detail and very helpful fast respond
here is what i did as u said

"*****In IE8, right click the page and look at codification to
see what codeset is being used, select "Unicode (UTF-8)" if not selected yet
to see if it render Amahric properly****"

and it was not selected and i select UTF-8 and it rendered it perfectly

In Firefox it shows "text/html; charset=ISO-8859-1" so that
- i convert the DB Collation to utf8_general_ci(i just alter the
tables collation )

-edit php.ini (mbstring.language = Neutral;
mbstring.internal_encoding = UTF-8;)

- n i even try to change default_charset to UTF-8

but still i face same problem,no change.
is there anything i did wrong? or something i have to do??

thank you
solomon H.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Web-ERP-translation mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-translation
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

ExsonQu
Administrator
Hi, Soloman,
     
       For display problem, I think there is two parts are important. The first one is that data coded in HTML files or .php files, and others is data extract from database.
       if the data does not display correctly from php code or HTML code, you should check if the po file has set a right charset, it must be set utf-8. If you use IE, the character display normally and firefox does not. It may not be related with po files.
      If you've stored some data into sql before, you should change charset for stored data. You can backup those data into a sql file. Then open it with MS notpad, then save it in UTF-8. Otherwise it will still display abnormal.
      And I've tried weberp3.11.3, it support utf-8, and the vision lower than this will may not support utf-8.
      Hope it is helpful.
      Best regards!
      Exson
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

Civicom.eu
In reply to this post by solomon hm
Hi Solomon,

Now what is clear is that the page content is UTF-8 but the browsers render
it like it was ISO, so,

Let's try to get the web pages to be declared UTF-8 encoded for the browsers
to know that.

1) In config.php set default language to am_ET.utf8

· $DefaultLanguage = 'am_ET.utf8'

2) In the following files, check what charset appears ¿ISO-8859-1 or UTF-8?
and set them to UTF-8

· includes/header.inc

This is the html header (not to be confused with the http header) and will
tell the charset (of the web pages) to the client browser (for the client to
decode the pages correctly). The charset appears twice: line 10 and 19. It
may be ISO or UTF-8 but in your case must be UTF-8.

Also look at the files:

· Logout.php (line 11)
· includes/Login.php (line 16)

(in general you may do a search to look at every ISO-8859-1 string and
replace them with UTF-8)

3) The directory weberp/locale has a subdirectory named "am_ET.utf8" for
your language files.

4) Look at your .po and search strings like ISO-8859-1 and UTF-8 to see if
there are dynamic charset changes.

· remove the msgids or make them get translated to msgstr "UTF-8"

5) Edit php.ini

mbstring.language = Neutral;
mbstring.internal_encoding = UTF-8;)

6) Check that Apache is not overriding the html header and not sending an
http header.

7) Once you have reviewed the above, maybe you have changed the .po and .mo
so Apache must be restarted.

8) It's time for a new test.

· Do the right clicks we have mentioned in previous messages to see the
client behaviour.
· Tell IE8 or FF to show you the page source code to see the language meta
tag and check that charset is declared to be UTF-8



Well, maybe I forgot something, let me know the test results,
warmest regards,
javier de lorenzo-cáceres
Canary Islands




----- Original Message -----
From: "solomon hm" <[hidden email]>
To: "Discussion of webERP translation issues"
<[hidden email]>
Sent: Thursday, June 17, 2010 3:10 AM
Subject: Re: [webERP -translation] Unicode problem


> first i like to thank you for ur detail and very helpful fast respond
> here is what i did as u said
>
> "*****In IE8, right click the page and look at codification to
> see what codeset is being used, select "Unicode (UTF-8)" if not selected
> yet
> to see if it render Amahric properly****"
>
> and it was not selected and i select UTF-8 and it rendered it perfectly
>
> In Firefox it shows "text/html; charset=ISO-8859-1" so that
> - i convert the DB Collation to utf8_general_ci(i just alter the
> tables collation )
>
> -edit php.ini (mbstring.language = Neutral;
> mbstring.internal_encoding = UTF-8;)
>
> - n i even try to change default_charset to UTF-8
>
> but still i face same problem,no change.
> is there anything i did wrong? or something i have to do??
>
> thank you
> solomon H.
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Web-ERP-translation mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/web-erp-translation 


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Web-ERP-translation mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-translation
Reply | Threaded
Open this post in threaded view
|

Re: [webERP -translation] Unicode problem

solomon hm
Thank you!!! WOW Its BEST support ,best community ...
this time it works perfectly.
And i will contribute the translated version as soon as me and my team
finish it.
with regards
solomon H.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Web-ERP-translation mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/web-erp-translation