Hello all,
Here is the entry I have just made about default encoding on the wiki:
Creating a new WO Application/WOnder application project in today's
version of WOLips generates the following warning:
WOO Encoding type UTF-8 doesn't match component MacRoman (Main.woo)
Changing the encoding type in the .woo and in the .html file manually
does not get rid of the warning. There are a couple of ways to go
about this:
Change the encoding for your entire Workbench
In Eclipse, go to Preferences>General>Workspace and select UTF-8 as
the Text File Encoding. This should set the encoding for all the
resources in your workspace. Any components you create from now on
using the default encoding should all match.
– Note from Eclipse help about text encoding –
"Given the ability to use the platform in a networked team
environment, it's certainly possible that users will want to work
with text files that use a different encoding scheme than their
native encoding scheme so that they can easily interchange files with
another team. For this reason, the workbench defines its own encoding
profile that is specified by the user in the Preferences dialog.
Users may choose from the available encoding choices in the General >
Workspace preference page or type in their own encoding. Plug-ins
that interpret text files, such as editors and builders, should
consult the workbench encoding preference rather than assume that the
installed operating system encoding is in use."
Currently, creating a new project will generate the above warning in
the Main component, but that can be fixed by doing the following:
Change the encoding for a resource (project, folder or file)
Right (or Control) click on the resource in the WO Package Explorer
and select the Properties option at the bottom of the contextual
menu. Go to Resource>Text File Encoding. You should see "Inherited
from container (UTF-8)" if you've made the change above, otherwise it
will be (MacRoman). Select Other - UTF-8 and Apply to make the
warning go away.
– Original note about this from Q –
"It should now be possible to change the encoding type of a component
using just the eclipse "Resource->Text file encoding" context menu on
the component in the WO Package Explorer. This will automaticaly edit
the woo file, or create one if necessary, and explicitly set the
encoding type of the .html and .wod files. This process requires that
you use a valid Java charset instead of the old NS* obj-c style
charset name.
This change also means that the encoding type of a component can be
inherited from the parent folder. So you can manage the encoding type
of all components within a folder by changing the default encoding
type of the parent folder (assuming the contained components still
inherit their encoding type, the default behaviour).
The WOComponent creation wizard hasn't yet been updated to reflect
these changes, so a newly created component will still be created the
same as before, and may have warnings about the character encoding of
the woo file not matching that of the component, this will change in
the future."
On 9-Jan-08, at 6:53 PM, Pierre Frisch wrote:
> This is really a nice change and I am sure it will save most user a
> lot of grief with having the encoding being interpreted differently
> between eclipse and WebObjects. Take those warning seriously if you
> are doing anything else than US-ASCII -:)
>
> Cheers
>
> Pierre
> On Jan 9, 2008, at 16:24, Q wrote:
>
>>
>> On 10/01/2008, at 9:57 AM, David Holt wrote:
>>
>>> Sorry for the noise. I just found Q's message from December about
>>> the encoding management change.
>>>
>>> I'll make a note of this in the wiki.
>>>
>>
>> Sorry about the confusion.
>> I haven't had a chance to look into updating the project and
>> component wizards to reflect this yet.
>>
>>> David
>>>
>>> On 9-Jan-08, at 3:42 PM, David Holt wrote:
>>>
>>>> Creating a new WO Application/WOnder application project in
>>>> today's version of WOLips generates the following warning:
>>>>
>>>> Severity and Description Path Resource Location Creation Time Id
>>>> WOO Encoding type UTF-8 doesn't match component MacRoman Test/
>>>> Components/Main.wo Main.woo Unknown 1199921851770 19524
>>>>
>>>>
>>>> Changing the encoding type in the .woo and in the .html file
>>>> does not get rid of the warning. I have refreshed and cleaned
>>>> the project. What am I doing incorrectly?
>>>>
>>>> Also, shouldn't default components be generated without encoding
>>>> mismatches?
>>>>
>>>> Thanks,
>>>> David
>>>>
>>>> These are the values in my Main component:
>>>>
>>>> Main.html
>>>>
>>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>> <html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en"
>>>> lang = "en">
>>>> <head>
>>>> <meta http-equiv = "Content-Type" content = "text/html;
>>>> charset=utf-8" />
>>>> <title>untitled</title>
>>>> </head>
>>>> <body>Hello World!</body>
>>>> </html>
>>>>
>>>> Main.woo
>>>>
>>>> {
>>>> "WebObjects Release" = "WebObjects 5.0";
>>>> encoding = NSUTF8StringEncoding;
>>>> }
>>>
>>
>>
>>
>> --
>> Seeya...Q
>>
>> Quinton Dolan - qdola..mail.com
>> Gold Coast, QLD, Australia (GMT+10)
>> Ph: +61 419 729 806
>>
>>
>>
>
This archive was generated by hypermail 2.0.0 : Thu Jan 10 2008 - 13:10:30 EST