hidrau
asked on
Doubt about Charset Firebird
Hello Guys,
I am in a terrible doubt. What charset should I use for a field?
I am creating an table where there is a field named "name", this field will keep the
user name, but the user name can be Greeck, Hebrew, Arabic, English, French, Italian, Spanish or portuguese. I am really in doubt what charset I should use to it. Is there any that can handle with all kind of characters?
Help me on this
Thanks
Alexandre
I am in a terrible doubt. What charset should I use for a field?
I am creating an table where there is a field named "name", this field will keep the
user name, but the user name can be Greeck, Hebrew, Arabic, English, French, Italian, Spanish or portuguese. I am really in doubt what charset I should use to it. Is there any that can handle with all kind of characters?
Help me on this
Thanks
Alexandre
ASKER
Hello Dan, thanks for replying me.
so, UTF-8 can keep hebrew, arabic, portuguese, english etc words?
if so, I can have only one field for all these languages that I need to work and I am very glad to know that :)
so, UTF-8 can keep hebrew, arabic, portuguese, english etc words?
if so, I can have only one field for all these languages that I need to work and I am very glad to know that :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok,
Dan, imagine that I need to insert a name like this " alexandre " that is Portuguese in my name field. as I understood, for each character of that name I'll have 2 bites, now, if I need to insert a hebrew name / word like ¿¿¿¿¿¿¿¿¿¿¿ for each character I will have 4 bites, right?
If so, then for this word ¿¿¿¿¿¿¿¿¿¿¿ that has 5 character I must have a varchar field with 20.
That is an example, because I can have a word with 15 hebrew character.
Dan, imagine that I need to insert a name like this " alexandre " that is Portuguese in my name field. as I understood, for each character of that name I'll have 2 bites, now, if I need to insert a hebrew name / word like ¿¿¿¿¿¿¿¿¿¿¿ for each character I will have 4 bites, right?
If so, then for this word ¿¿¿¿¿¿¿¿¿¿¿ that has 5 character I must have a varchar field with 20.
That is an example, because I can have a word with 15 hebrew character.
Don't know the details in Firebird, but I would assume that for UTF-8 encoding, if you declare varchar(20) it will always have 80 bytes (4 bytes/char).
ASKER
hummm,
Let me see whether I got it.
varchar(20) will keep 20 characters, it doesn't mind if it is English, Portuguese, Hebrew or Arabic. It will keep 20 characters and for each character I will have 4 bites using UTF8, am I right Dan?
Let me see whether I got it.
varchar(20) will keep 20 characters, it doesn't mind if it is English, Portuguese, Hebrew or Arabic. It will keep 20 characters and for each character I will have 4 bites using UTF8, am I right Dan?
Yup, that's about right, AFAIK.
ASKER
Ok Dan.
Thanks very much for your help. You helped me a lot to understand it.
Thanks very much for your help. You helped me a lot to understand it.
Glad I could help!
HTH,
Dan