Re: How to upload form data containing special characters correctly?



Jerry Stuckle wrote:

You'll need to select the correct character set for MySQL. It might be utf-8, as some have suggested, but you might find another charaset more applicable. See the MySQL doc and comp.databases.mysql newsgroup for more info on mysql topics.

Well, I've been hearing for a while UTF-8 is the best for all that stuff, so tables and DB's are all in utf8_general_ci (does anyone know the difference between that and utf8_bin, and what's utf8_unicode_ci doing in that list)

Also, rather than use addslashes() you should use mysql_real_escape_string() to escape your characters.

Some like the other better, there are still discussions going on... :-)
http://www.sitepoint.com/forums/showthread.php?t=337881

You shouldn't use htmlspecialchars() for storing data into the database; that's a display issue, not a storage issue. You should only use it when displaying data (if necessary).

The fact is that the data does not realy need to be displayed in a webpage, this is just for uploading. I'll rather use OpenOffice with MyODBC to edit the data when needed and use a report to display it.

And also ensure you're using the correct character set on your html page to display the data.

I guess this is the case.
The header contains <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />

Now I'm going to try this and I'll let you know the outcome.

Thanks a bunch,

Wimmy
.



Relevant Pages

  • Re: Can I shorten up this or other NG names?
    ... >> does too) the display name is sent to the servers as the newsgroup name ... > The application dictates how it displays strings. ... > do with querying the NNTP server. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Simple Display Name vs. Display Name
    ... Microsoft CSS Online Newsgroup Support ... <Subject: Re: Simple Display Name vs. Display Name ... <for Internet Mail Delivery. ...
    (microsoft.public.exchange.setup)
  • Re: Can I shorten up this or other NG names?
    ... >> because in most windows software versions regardless of manufacturer ... >> does too) the display name is sent to the servers as the newsgroup name ... >> newsgroups, server names and display names, the same as for mail accounts ... > to do with querying the NNTP server. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Can I shorten up this or other NG names?
    ... newsgroups, server names and display names, the same as for mail accounts ... In OE, the user could widen the tree pane but that wastes a lot of screen space, so hovering the mouse over the truncated name provides the workaround to showing long strings without having to resort to line wrapping. ... You could hover the mouse over the newsgroup title to get a popover showing the longer string. ... Nothing to do with querying the NNTP server. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: newsgroup listing
    ... >>> Hovering the mouse over the group folder will display a popup ... >>> the newsgroup list window for resizing it. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)