Tech Off Thread

8 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

British Pound (£) symbol

Back to Forum: Tech Off
  • User profile image
    sbc

    When filling in a Web Form and submitting it, I find that all british pound sterling symbols (£) are removed (as is the Euro symbol €). This does not happen with $, why does this happen?

    Does not happen on these forums, but the message box is a rich text box rather than a plain <textarea>

    Edit: Seems to work with the subject box (on these forums) as well, but not on the pages I am doing).

  • User profile image
    themaffeo

    This could be one of two problems:

    First, check out the ResponseEncoding and RequestEncoding attributes of the page directive.

    ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskselectingencodingforwebformsglobalization.asp )

    Second, it might be a problem with the thread's current culture converting the currency symbols, but I doubt it.


    My guess would be its an encoding issue. Try running with the trace mode on and examine the http headers -> see if the form or querysting output has the unicode characters in them, if they do then its probably a system.globalization.cultureInfo issue, otherwise its probably an encoding issue.

  • User profile image
    sbc

    Changed the insert record code to use SQL Parameters, the culture to 'en-GB' and encoding to 'iso-8859-1'
    Euro's get inserted as '?', but '£' get's inserted fine.
    Is this due to culture or encoding?

  • User profile image
    Sven Groot

    It's an encoding issue. I basically advise to always use utf-8, that way you'll practically never have any encoding trouble. People could enter Japanese and it'd still work.

  • User profile image
    matt0210

    Had the same problem on an old Oracle 8 installation with Euro. You should use iso-8859-15. It includes all european currencies as well. For me it was a simple encoding problem, nothing more. I changed the codepage on the server and clients and everything worked. Hope this helps!

  • User profile image
    Catatonic

    Windows-1252 also has the Euro symbol. But as Sven suggests, UTF-8 can handle just about any character in existence.

  • User profile image
    sbc

    I don't think anyone will be using Japanese (will just stick with English), so is UTF-8 still the best choice?

    The column is of type 'varchar' and only English (British/US [due to incorrectly set up machines]) will be input.

  • User profile image
    Rossj


     You may as well use UTF-8 - you are not wasting space by doing this (well not much). UTF-8 only uses multi-byte characters when it needs to.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.