473,379 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Unicode characters

as a biginner,

maybe I have a question already answered 1000 times but I do not know
how to find the answers.

problem:

depending on an input value, I would like to output greek characters
(f. e. those between U+03B1 to U+03C9. One way would be to define two
arrays: one with the possible input values ("abgde...") and a second
array with the corresponding values ("\u03b1\u03b2\u03b3...").

But I hoped I could skip the second by a computation, f.e. "g" has
index 2 in the first array, so output "\u03b1"+2.

This does not work (of course). But do I have a chance to "compute"
the output value?

Thanks
Hanspeter

Aug 2 '07 #1
2 1876
sc*******@rz.uni-frankfurt.de wrote:
But I hoped I could skip the second by a computation, f.e. "g" has
index 2 in the first array, so output "\u03b1"+2.

This does not work (of course). But do I have a chance to "compute"
the output value?
Perhaps is the following useful:

alert(String.fromCharCode("\u03b1".charCodeAt(0) + 2));
JW
Aug 2 '07 #2
schnei...@rz.uni-frankfurt.de wrote:
maybe I have a question already answered 1000 times but I do not know
how to find the answers.

problem:
depending on an input value, I would like to output greek characters
(f. e. those between U+03B1 to U+03C9. One way would be to define two
arrays: one with the possible input values ("abgde...") and a second
array with the corresponding values ("\u03b1\u03b2\u03b3...").
Yes it looks like Greek-Greeklish has been done many times before:

http://www.google.com/search?q=greek...ish+conversion
http://www.translatum.gr/converter/g...-converter.htm
http://ncnever.free.fr/translit/
http://speech.ilsp.gr/greeklish/greeklishdemo.asp
But I hoped I could skip the second by a computation, f.e. "g" has
index 2 in the first array, so output "\u03b1"+2.

This does not work (of course). But do I have a chance to "compute"
the output value?
Considering the character conversions at
http://www.translatum.gr/converter/g...literation.htm
I think you need a lookup-table anyhow.

Hope this helps,

--
Bart

Aug 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Hallvard B Furuseth | last post by:
Has someone got a Python routine or module which converts Unicode strings to lowercase (or uppercase)? What I actually need to do is to compare a number of strings in a case-insensitive manner,...
48
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at...
4
by: Basil | last post by:
Hello. I have compiler BC Builder 6.0. I have an example: #include <strstrea.h> int main () { wchar_t ff = {' s','d ', 'f', 'g', 't'};
7
by: Michael Davis | last post by:
Hi, I've known C/C++ for years, but only ever used ascii strings. I have a client who wants to know how gcc handles unicode. I've found the functions utf8_mbtowc, utf8_mbstowcs, utf8_wctomb and...
18
by: Ger | last post by:
I have not been able to find a simple, straight forward Unicode to ASCII string conversion function in VB.Net. Is that because such a function does not exists or do I overlook it? I found...
14
by: abhi147 | last post by:
Hi , I want to convert an array of bytes like : {79,104,-37,-66,24,123,30,-26,-99,-8,80,-38,19,14,-127,-3} into Unicode character with ISO-8859-1 standard. Can anyone help me .. how should...
8
by: Preben Randhol | last post by:
Hi If I use len() on a string containing unicode letters I get the number of bytes the string uses. This means that len() can report size 6 when the unicode string only contains 3 characters...
7
by: 7stud | last post by:
Based on this example and the error: ----- u_str = u"abc\u9999" print u_str UnicodeEncodeError: 'ascii' codec can't encode character u'\u9999' in position 3: ordinal not in range(128) ------
8
by: mario | last post by:
I have checks in code, to ensure a decode/encode cycle returns the original string. Given no UnicodeErrors, are there any cases for the following not to be True? unicode(s, enc).encode(enc)...
8
by: miztaken | last post by:
Hi, I have a string with some unicode characters and when i tried to displayed it in TreeView its not displaying. I am doing like this: TreeNode tn = new TreeNode("unicodestring");...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.