Pages: [1]   Go Down
Author Topic: Arduino compilter Encoding to ISO8859_8 ?  (Read 1532 times)
0 Members and 1 Guest are viewing this topic.
Israel
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,

I'm trying to make my arduino compiler support ISO8859_8 encoding so i can type in hebrew to LCD and to Serial Monitor..

Where can i change the encoding? any ideas?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 209
Posts: 13027
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I doubt the compiler itself cares.  The text should be nothing more than a stream of eight-bit values to the compiler.

The editor, serial monitor, and LCD are a different story.

Have you confirmed that the LCD supports Hebrew characters?
Logged

Israel
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes the LCD supports hebrew charecters...
And the editor too, but when im writing like Serial.print("[ch1513][ch1500][ch1493][ch1501]");
so i get gibbrish in the serial, and same on the lcd..
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 209
Posts: 13027
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Serial.print("[ch1513][ch1500][ch1493][ch1501]");
From what I can tell, the character encoding in that string is Unicode.  This is what the disassembler outputs...

Serial.print("\u05e9\u05dc\u05d5\u05dd");

A quick Google search and I found this...
http://unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT

Try this...
Serial.print( "\xF9\xEC\xE5\xED" );
« Last Edit: September 01, 2010, 02:37:26 pm by bcook » Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes the LCD supports hebrew charecters...

I know this may or may not be kosher for you (sorry, couldn't help myself  smiley-wink ) - but since you managed to find a character LCD that supported hebrew, do you know of one that supports Arabic?

On another forum I visit, a gentleman was looking for such an LCD; I told him it may be easier to use a GLCD, that I didn't know of an LCD that supported Arabic.

If you (or anyone else) know of one, I could pass it on...

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Israel
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
From what I can tell, the character encoding in that string is Unicode.  This is what the disassembler outputs...

Serial.print("\u05e9\u05dc\u05d5\u05dd");

A quick Google search and I found this...
http://unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT

Try this...
Serial.print( "\xF9\xEC\xE5\xED" );

it works, and Serial.print((char)136);
works too, but im trying to make the compiler auto work with
Serial.print("[ch1513][ch1500][ch1493][ch1501]"); so i wont need to search for encodings and unicodes anytime i want to write in hebrew smiley

Quote
I know this may or may not be kosher for you (sorry, couldn't help myself   ) - but since you managed to find a character LCD that supported hebrew, do you know of one that supports Arabic?

lol, not really a friend bought it from a store in israel, so i dont really know sorry. (but you really made me laugh)  ;D
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 209
Posts: 13027
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
im trying to make the compiler auto work with
Serial.print("[ch1513][ch1500][ch1493][ch1501]"); so i wont need to search for encodings and unicodes anytime i want to write in hebrew
You will need to get the Arduino editor to work in "ISO8859_8" rather than Unicode.  I have no idea how to do that or even if it is possible.

I do know that the Windows operating system has support for switching an application's code page.


Some other things that MAY work...

- An external editor.  The Arduino IDE has support for external editors.  Try to find a source code editor that works under "ISO8859_8".

- It looks like the "ISO8859_8" Hebrew character set isn't too big.  You could put a layer over Serial.print that translates the Unicode characters at run-time.  

- Use another editor (like Notepad) to enter the strings then copy-and-paste the strings into the Arduino editor.
« Last Edit: September 02, 2010, 02:49:22 pm by bcook » Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
lol, not really a friend bought it from a store in israel, so i dont really know sorry. (but you really made me laugh)

Well, I am glad I brightened your day a little, at least.

 smiley-wink

I recommended that he use a GLCD, and so were others (apparently, someone even posted a link to a project for writing arabic on a GLCD - a font library rendering system of sorts). After your post, I then tried to look for "multilingual character LCDs" but didn't get far; it seems like you can only find english, japanese, and chinese displays on the mass market.

I am sure you can get others as well, but they would likely have to be a special OEM order kind of item (ie, order 1000+ direct from the manufacturer with a custom made character set on the CGROM). This is likely how your friend got the hebrew version; someone in israel likely sourced them special-made from a device manufacturer of LCDs with a custom hebrew character set on the ROM, and then they sell them to hobbyists and/or developers (that, or someone had done it for a device run, didn't make it in the market, and they landed on a surplus deal or something).

I know that Israel has a lot of "high-tech" industry (one company there, for instance, called Actuate - makes one heck of a nice reporting software package - it isn't cheap, though); I am not sure how much a place like, say, Saudi Arabia has - but that would be one of the few places that you likely could find such a device. Its such a niche item that only has wide usage and need in predominantly Arabic-speaking countries. I suppose for your hebrew LCD, it is likely only something found in a predominantly hebrew-speaking country, like Israel.

Lastly, I am not even sure if readable Arabic script could be fit into the dot patterns on a standard character LCD; the script is fairly ornate, and may or may not be reproduceable in a readable fashion, unless there is some simplified form which I am probably not aware of...

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Pages: [1]   Go Up
Jump to: