Hello everyone,
I'm here trying to include a greek text inside my software, withouth success.
I've searched the forums here to find a solution, and as far as I understand there is not much that I can do at the moment.
All I'm trying to do is to grab a string like the following "Το έμβλημα της αστυνομίας της Middle City.", pass it to "CreateTextObject" instruction and then display it on screen. According to "Notepad++", the file containing all the strings is a standard ISO 8859-7 greek text file. Reading the forums (and the manual) this format is not yet included in Hollywood (it only displays very garbled text), so I tried different roads:
- converted it into ANSI: nothing
- converted it into UTF-8 (with AND without BOM): nothing
- converted into ISO 8859-1: nothing (obviously).
Since one of the forums suggested to leave the script as it is and send it to the greek tester (which, of course, has greek prefs in his machine), I also compiled a test version for him: nothing.
What else can I try to do?
Best regards
g0blin
Problems with greek text
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problems with greek text
You need to set the "Encoding" tag to UTF8, i.e.
Also make sure that the font you're using supports Greek characters.
Code: Select all
CreateTextObject(1, "....", {Encoding = #ENCODING_UTF8})
Re: Problems with greek text
I tried yesterday night, without success.
The text is nicely showing inside "Notepad++", using ISO 8859-7 and UTF8 encoding. Nonetheless, Hollywood IDE (windows) shows only garbage, and the running code is even worse.
I'm using Hollywood in-build font engine and font style is set on "Serif Bold".
I'll try again tonight with different fonts and I'll report back.
The text is nicely showing inside "Notepad++", using ISO 8859-7 and UTF8 encoding. Nonetheless, Hollywood IDE (windows) shows only garbage, and the running code is even worse.
I'm using Hollywood in-build font engine and font style is set on "Serif Bold".
I'll try again tonight with different fonts and I'll report back.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problems with greek text
Don't paste non ISO 8859-1 into the Windows IDE because it is not designed to handle this. The best approach is to store all non-Latin text in external, UTF-8 encoded files (but without the BOM). Then import the language strings from these external files and pass them to CreateTextObject(). AFAIR the inbuilt fonts don't support Greek characters. You need to use a different font for this, e.g. one from the DejaVu series. These are more complete.
Re: Problems with greek text
I'm also interested in this topic (UTF8 Text).
What does BOM mean in this context ?
And which Editor could I use for writing external Text files containing UTF8 Text on MorphOS ?
What does BOM mean in this context ?
And which Editor could I use for writing external Text files containing UTF8 Text on MorphOS ?
Re: Problems with greek text
Thanks Andreas, I'll work on in on the weekend and let you know.
@p-OS
I'm not very into it myself, so check this extract from Wikipedia:
"The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of a text file or stream. It is encoded at U+FEFF byte order mark (BOM). BOM use is optional, and, if used, should appear at the start of the text stream. Beyond its specific use as a byte-order indicator, the BOM character may also indicate which of the several Unicode representations the text is encoded in."
@p-OS
I'm not very into it myself, so check this extract from Wikipedia:
"The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of a text file or stream. It is encoded at U+FEFF byte order mark (BOM). BOM use is optional, and, if used, should appear at the start of the text stream. Beyond its specific use as a byte-order indicator, the BOM character may also indicate which of the several Unicode representations the text is encoded in."
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Problems with greek text
Most UTF8-capable text editors will write the BOM at the beginning of the text file to indicate that the text file uses UTF-8 encoding. This BOM consists of the following three bytes: $EF $BB $BF. In ISO8859-1 these bytes are shown as  but UTF-8 capable viewers of course won't show them.p-OS wrote:I'm also interested in this topic (UTF8 Text).
What does BOM mean in this context ?
Scribble supports UTF-8 text.And which Editor could I use for writing external Text files containing UTF8 Text on MorphOS ?