Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Polish characters causing problems

Options
  • 30-08-2007 2:29pm
    #1
    Registered Users Posts: 21,257 ✭✭✭✭


    Hi folks,

    Our company website has a large Polish section, including some ordering forms. The output of these forms is exported into CSV and imported into various systems on various platforms.

    A good few of the names have Polish characters in them - depending on the browser, back-end system these are translated into a range of characters - some of them control characters. I only have control over the website code, and changing any of the other systems will be a much larger piece of work.

    Although not ideal, it looks like client side JavaScript is the most reliable way to check for the characters, and then replace them with the closest alternatives. I could also change them to their HTML entity equivalent, but this will cause problems when the output is exported again. I know that you can't rely on client side JavaScript, but by the time the text has reached the webserver, it may already have been translated to something entirely different anyway.

    Putting the following meta-tag doesn't work:
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2"/>
    

    Has anyone else run into a similar problem - if so, how did you get around it?

    Eoin


Comments

  • Registered Users Posts: 3,594 ✭✭✭forbairt


    What character set are they exported as ?

    What type of database are you reading them into for the website ?


  • Closed Accounts Posts: 198 ✭✭sh_o


    I had a similar issue dealing with Japanese characters on a form and then emailing them onto multiple destinations. I tried lots of different ways and character encoding and in the end gave up and ended up doing the folowing ( I hadn't any more time to spend trying other things out!) -

    I used UTF-8 as the encoding on the web page and then when the web form was posted, the characters would be automatically translated into html entites.
    On the server side (processing the form), I then used some jsp to call HTMLEntites on the server side to convert the code back to the actual characters that should be there which I then passed onto a bean to email the correct characters.

    Not ideal I know but it worked!


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Thanks for that - I had a bit of problems with the encoding, again it could be to do with the crappy platform we're using. I tried the UTF-8, but it did funny things with some of the characters here.

    I ended up using the CMS to create a table of translations which the content team can edit. This is printed out into a client side JavaScript function which escapes the textbox and textarea values into UNICODE, and then does a search and replace.

    So, if someone enters a Polish character like ą (may not appear properly here), it is converted on the client into %u0105. The function can then replace this with whatever Latin character is appropriate.


  • Registered Users Posts: 1,127 ✭✭✭smcelhinney


    When I first saw the subject I thought it was something to do with some undesirable eastern Europeans hanging around by your local Dunnes Stores.. imagine my dismay.. :rolleyes:

    What about using XML and ENTITY declarations, and transforming on the fly? This is how I would do it, but I wouldnt swear by it..

    Google XML ENTITY non-standard characters, that will give you a starting point.


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    When I first saw the subject I thought it was something to do with some undesirable eastern Europeans hanging around by your local Dunnes Stores.. imagine my dismay.. :rolleyes:

    What about using XML and ENTITY declarations, and transforming on the fly? This is how I would do it, but I wouldnt swear by it..

    Google XML ENTITY non-standard characters, that will give you a starting point.

    I could probably have worded it better actually!

    Thanks for the suggestion, I'll check that out now.


  • Advertisement
Advertisement