Log in

View Full Version : inserting special characters into database



hemi519
01-10-2011, 09:46 AM
Hi All,

I have a registration form where users can register into my site. But some of users from other countries are using some different types(russian or sweden or anyother) of alphabets . When iam selecting from my database those letters are displaying as encoding letters. How can i solve this issue

djr33
01-10-2011, 08:12 PM
Use an encoding that supports all of the characters needed. UTF8 (unicode) is the best idea unless you know it will only be European alphabets (not including Arabic, from the list you gave).

Next, make sure that ALL of your website uses exactly the same encoding. This includes: your HTML (an encoding tag), your HTML pages as text files (the encoding of the file itself), your server (should be fine, but if you are using PHP or another serverside language make sure it isn't converting to another encoding while it processes), and your databases (this can be the most difficult, and make sure it's consistent throughout your database tables). There may be other places where the encoding changes as well. Also, if you are using any 3rd party software like a forum, make sure it is compatible, and look through the admin control panels to find an option to use unicode.

cindylou
01-11-2011, 09:29 AM
hi dj...

i was just wondering if this unicode is ok to use in ASP since i'll be needing this on my web design..i'm not quite good in using HTML but i know the basics...

thanks :)

molendijk
01-11-2011, 11:12 AM
You could use this (http://www.let.rug.nl/molendyk/converters/convert_to_unicode.html).
===
Arie Molendijk.

cindylou
01-11-2011, 11:35 AM
oh, thank you...i'll use this when i get a chance...this is good...

:)

djr33
01-11-2011, 08:56 PM
Unicode is an underlying format to store information. It can be used with basically any language, since the result is the same HTML. Of course it might cause some problems depending on how you are processing the text. If you aren't manipulating it (just reading and writing) that's fine. But if you need to, for example, search for a shorter version of the text, it might be confused by the different encoding.
For example, in PHP there are multibyte string functions designed for that type of operation when using unicode. There may be similar things for ASP, though I'm not sure since I don't work with it. But I'm sure that ASP can be used with unicode.