Re: UTF-8 forms and database, still some special characters get through as things like fi Why?
Re: UTF-8 forms and database, still some special characters get through as things like fi Why?
- Subject: Re: UTF-8 forms and database, still some special characters get through as things like fi Why?
- From: Lachlan Deck <email@hidden>
- Date: Tue, 24 Nov 2009 06:55:59 +1100
On 24/11/2009, at 3:58 AM, Patrick Robinson wrote:
> Just another couple of ideas:
>
> Regarding (4) below, If your project doesn't use Wonder, then in your Application constructor, do this:
> WOMessage.setDefaultEncoding("UTF8");
UTF-8 please. UTF8 is an old/incorrect definition.
> Regarding (5), if you're using HTML 4.01 Transitional, then it might look something like this:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
> etc.
>
> - Patrick
>
>
>
>
> On Nov 12, 2009, at 8:11 AM, Ramsey Lee Gurley wrote:
>
>> Hi Johan,
>>
>> Just a short checklist that I can think of... Don't forget:
>>
>> 1) The database needs to be storing values in UTF-8. If it isn't, then all your effort is wasted :) For MySQL that means a db url like
>>
>> jdbc:mysql://localhost/Example?capitalizeTypenames=true&zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8
>>
>> And setting your default charset and collation in your my.cnf file.
>>
>> 2) Different fonts may not have all the characters to display the different characters. If you're using a default stylesheet, then the browsers may be displaying differently simply because of fonts. Speaking of stylesheets, you probably want to encode that in UTF-8 also. Start your stylesheet with something like
>>
>> @charset "UTF-8";
>> @import url("reset.css");
>>
>> /* Begin site CSS */
>>
>>
>> 3) Set eclipse encoding<Screen shot 2009-11-12 at 7.49.36 AM.png>
>> 4) Use Wonder. Set encoding in the properties file
>> # Project Encoding
>> er.extensions.ERXApplication.DefaultEncoding=UTF-8
>>
>> 5) Set encoding in the page wrapper
>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>> <!DOCTYPE html PUBLIC
>> "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
>> "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd">
>>
>> 6) Localizable.strings should be encoded in UTF-16
>>
>> That's all I can think of off the top of my head. Anyone have more? Perhaps we should put up a wiki page just for project encoding since it seems to be something a lot of people stumble on.
>>
>> Ramsey
>>
>> On Nov 12, 2009, at 6:07 AM, Johan Henselmans wrote:
>>
>>> Reading David Griffith's struggle with the euro sign, I thought checking myself if that worked in my test application.
>>>
>>> What I did was: go to a textfield in a form, then (on a mac) press shift and alt key, and go over the keyboard from 1 in the upper left to / in the lower right.
>>>
>>> Save the stuff, or do something with it, like going to a next form or back or whatever.
>>>
>>> Interestingly, it Seems that some characters are not picked up by the UTF-8, while others are.
>>>
>>> These are the results in Safari:
>>>
>>> ⁄€‹›fifl‡°·‚—±Œ„´‰ˇÁ¨ˆØ∏”’ÅÍÎÏ˝ÓÔÒÚÆ»`¸˛Ç◊ı˜Â¯˘¿
>>>
>>> Here in Firefox:
>>>
>>> ⁄€‹›fifl‡°··‚—±Œ„´‰ˇÁ¨ˆØ∏”’ÅÍÎÏ˝ÓÔÒÚÆ»¸˛Ç◊ı˜Â¯˘¿
>>>
>>> This is WebObjects 5.4.3, latest wonder, OS X 10.5.8 latest security updates
>>>
>>> Can anyone explain to me why that is?
>>>
>>> (I hope the mailserver does not screw up).
>>>
>>> Regards,
>>>
>>> Johan Henselmans
>>> http://www.netsense.nl
>>> Tel: +31-20-6267538
>>> Fax: +31-20-6279159
>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden