Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
61 user(s) are online (54 user(s) are browsing Forums)

Members: 1
Guests: 60

ferrels, more...
Support us!
Recent OS4 Files
OS4Depot.net





Converting catalog in UTF-8 code
Quite a regular
Joined:
2008/11/19 22:44
From Tarsus IV
Posts: 548
I have finished the localization (in greek) for the newest version of OWB, but in the catalog description file there is a part which strongly mentions to convert the below strings in UTF-8 (for the context menus).

How you can do that, when you create a new catalog? Although everything is working fine, the context menus appear empty (no characters).

Will I need a UTF-8 supported text editor for that, or I can fix that via FlexCat (I'm not completely sure about that)?

   Report Go to top

Re: Converting catalog in UTF-8 code
Home away from home
Joined:
2006/12/2 3:55
From Italy, Perugia
Posts: 3140
@Phantom

Never had such problem when translating in my language, but for what i've understand it appear empty when a string is not availible or cannot be see by the program.. aniway did you got this UTF8 alert during compiling with Flexcat right ?

If yes, can you post the message/error here ?

Aniway for any UTF8 project you might try to work "side by side" with NoWinED

   Report Go to top

Re: Converting catalog in UTF-8 code
Quite a regular
Joined:
2008/11/19 22:44
From Tarsus IV
Posts: 548
@ samo79

Well the string is available and translated of course, but bear in mind that italian uses latin characters, but greeks no. About FlexCat, no, it didn't give me an alert, it compiles the catalog without any problem.

I will try NoWinED to see.

   Report Go to top

Re: Converting catalog in UTF-8 code
Not too shy to talk
Joined:
2006/11/27 22:28
From Germany
Posts: 296
i think you can simply enter escape sequences for unicode. this should be much better readable and maintainable.
for example the german "ü" should result "\xc3\xbc"

on the os4 version unfortunately the utf8 "ü" in the catalog string results in the string not to be rendered...
roman needs to check this. no answer yet, though.

regards...
michael

   Report Go to top

Re: Converting catalog in UTF-8 code
Amigans Defender
Joined:
2006/11/17 22:40
From England
Posts: 3227
@Phantom

Quote:
I have finished the localization (in greek) for the newest version of OWB, but in the catalog description file there is a part which strongly mentions to convert the below strings in UTF-8 (for the context menus).


That sounds horribly non-standard. Catalog files are supposed to be in whichever 8-bit character set is specified in the header of the file. I'd be surprised if using UTF-8 for certain strings works at all, as locale.library may do some conversion of the strings when the catalog is loaded.

   Report Go to top

Re: Converting catalog in UTF-8 code
Quite a regular
Joined:
2008/11/19 22:44
From Tarsus IV
Posts: 548
I guess Roman might have an answer to this. As far as I remember this problem was also exactly the same with the first MUI-OWB port for AmigaOS 4.1 as well.

   Report Go to top

Re: Converting catalog in UTF-8 code
Just popping in
Joined:
2006/12/14 2:18
Posts: 151
Is there any form of existing "UTF8" header for catalogs?

When I begin expanding beyond code into having Japanese strings I will be needing to deal with escape sequencing *everything*.

There will also be some mixed strings due to that Japanese requires English remain a "side by side"...with the option of any "extended roman" characters are also to be available.

as for right now I am trying to work out some form of comrpessed phonetic format database to match off with the Japanese symbols so that I can properly list the relevant Kanji for any given translation options.

I will also need to reconsider how to use the Jim Breen dictionary database for translation purposes as well.

   Report Go to top

Re: Converting catalog in UTF-8 code
Quite a regular
Joined:
2008/11/19 22:44
From Tarsus IV
Posts: 548
NoWinED seems to do the job just fine for the UTF8 part though (it works), but all the others are completely broken unfortunately.

   Report Go to top

Re: Converting catalog in UTF-8 code
Just popping in
Joined:
2007/5/15 12:42
From Austria
Posts: 104
@Phantom

It looks like OWB is using mixed charsets inside the catalog file. Only MSG_LOCALIZED_XXX should be in UTF-8 and the codeset of the catalog should not be set to UTF-8.

You could try your original translation and replace only the MSG_LOCALIZED_XXX strings with the UTF-8 ones. But I don't know what the locale.library will do.

This should be fixed for the OS4 port.

   Report Go to top

Re: Converting catalog in UTF-8 code
Quite a regular
Joined:
2008/11/19 22:44
From Tarsus IV
Posts: 548
I have sent an email to Fab, hope that will get an answer soon.

   Report Go to top

Re: Converting catalog in UTF-8 code
Just popping in
Joined:
2007/5/15 12:42
From Austria
Posts: 104
@Phantom

I have done it with the german catalog because some of the popup menus where missing in my config (german_ISO-8859-15).

My Steps:

  • renamed the file "deutsch.ct" to "owb_german_l9.ct" (l9 = latin9 = ISO-8859-15)

  • edited all strings to iso-8859-15 in "owb_german_l9.ct"

  • converted the file "owb_german_l9.ct" to a new utf-8 file "owb_german_utf8.ct"
    > CharsetConvert owb_german_l9.ct ISO-8859-15 owb_german_utf8.ct UTF-8

  • copied "owb_german_l9.ct" to "owb_german_mixed.ct"

  • replaced all MSG_LOCALIZED_XXX from "owb_german_mixed.ct" with the ones from "owb_german_utf8.ct"

  • set "## codeset 111" in "owb_german_mixed.ct" (thats the MIBenum for ISO-8859-15, see L:CharSets/character-sets for your number)

  • set "## language german" in "owb_german_mixed.ct"

  • compiled the catalog
    > CatComp owb.cd owb_german_mixed.ct CATALOG OWB.catalog

  • installed the catalog in Catalogs/german



   Report Go to top

Re: Converting catalog in UTF-8 code
Quite a regular
Joined:
2008/11/19 22:44
From Tarsus IV
Posts: 548
Thanks, will try your tutorial and let you know.

   Report Go to top

Re: Converting catalog in UTF-8 code
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5388
@Phantom
If you done with, send me plz latest version for 1.23 as well

   Report Go to top

Re: Converting catalog in UTF-8 code
Just can't stay away
Joined:
2006/12/1 19:07
From Germany
Posts: 1022
@Belxjander

Quote:
Is there any form of existing "UTF8" header for catalogs?
Codeset 106 is UTF-8.

It doesn't matter which charset was used for creating a catalog, locale.library converts the strings into the encoding you select with OC_WantedCodeset (default: locale prefs selected ILocale->OpenLocale(NULL)->loc_CodeSet).

For example if Odyssey needs UTF-8 strings it has to use ILocale->OpenCatalog("Odyssey.catalog", OC_WantedCodeSet, 106, ...) to open it's catalogs. The translators must not change anything, they can still use for example ISO-8859-15 (Codeset 111) when creating their translations.

Quote:
When I begin expanding beyond code into having Japanese strings I will be needing to deal with escape sequencing *everything*.
AmigaOS 4.x only supports 8 bit charsets (the ones in LOCALE:Charsets and ISO-8859-1) and UTF-8 (Codeset 106) in locale.library, keymap.library, etc., but no multi byte charsets like Japanese ones, therefore you have to use UTF-8.

   Report Go to top

Re: Converting catalog in UTF-8 code
Not too shy to talk
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 411
@Phantom
you can use 'iconv' tool (http://www.os4depot.net/share/develop ... library/misc/libiconv.lha [libiconv-1.11/src/iconv]) it translates from/to varios codesets (iso_8859-15 to utf-8)

ex.: iconv -f iso_8859-15 -t utf-8 file_to_translate >RAM:translated.txt


Maybe it can do "on the fly" translation ex.: iconv -f iso_8859-15 -t utf-8 <óöÜñÑ
and will show/output translated to UTF-8

   Report Go to top

Re: Converting catalog in UTF-8 code
Just can't stay away
Joined:
2006/12/1 18:01
From Copenhagen, Denmark
Posts: 1106
@jabirulo

There's also C:CharSetConvert, so no need to go to OS4Depot for this task.

Best regards,

Niels

   Report Go to top

Re: Converting catalog in UTF-8 code
Not too shy to talk
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 411
@nbache

Oops, you're right, didn't notice such nice native tool

THX

   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project