Home » Eclipse Projects » Rich Client Platform (RCP) » Issue with apostrophes and NLS
| |
Re: Issue with apostrophes and NLS [message #464784 is a reply to message #464755] |
Thu, 15 March 2007 11:54 |
Anders Skarby Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Daniel Megert skrev:
> Anders Skarby wrote:
>
>> Hey guys (and girls),
>>
>> I'm having a major headache, concerning using Eclipse's NLS mechanism,
>> with text-strings containing 2 or more apostrophes.
>>
>> Take this example:
>> ------------------
>>
>> an entry, eg.
>>
>> Class.SOME_ENTRY=This is the dog's bone's arch nemesis
>>
>> gets returned through the NLS mechanism as the String:
>>
>> "This is the dogs bones arch nemesis"
>>
>> When only one apostrophe is in the String, it returns the String as
>> expected (that is, including the apostrophe).
>>
>> Can someone help me out, here?
>>
>> PS: Running Eclipse 3.2
>
> This works for me i.e. the NLS wizard creates this entry in the
> properties file:
> Key=This is the dog's bone's arch nemesis
>
> Dani
And what is your result, if you print it to the Console? I do also get
the correct entry in the properties file, this is not where the problem
lies - it's the output that's the issue.
|
|
|
Re: Issue with apostrophes and NLS [message #464867 is a reply to message #464784] |
Fri, 16 March 2007 14:56 |
Dani Megert Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Anders Skarby wrote:
> Daniel Megert skrev:
>
>> Anders Skarby wrote:
>>
>>> Hey guys (and girls),
>>>
>>> I'm having a major headache, concerning using Eclipse's NLS
>>> mechanism, with text-strings containing 2 or more apostrophes.
>>>
>>> Take this example:
>>> ------------------
>>>
>>> an entry, eg.
>>>
>>> Class.SOME_ENTRY=This is the dog's bone's arch nemesis
>>>
>>> gets returned through the NLS mechanism as the String:
>>>
>>> "This is the dogs bones arch nemesis"
>>>
>>> When only one apostrophe is in the String, it returns the String as
>>> expected (that is, including the apostrophe).
>>>
>>> Can someone help me out, here?
>>>
>>> PS: Running Eclipse 3.2
>>
>>
>> This works for me i.e. the NLS wizard creates this entry in the
>> properties file:
>> Key=This is the dog's bone's arch nemesis
>>
>> Dani
>
>
> And what is your result, if you print it to the Console? I do also get
> the correct entry in the properties file, this is not where the
> problem lies - it's the output that's the issue.
Do you run that string through MessageFormat? If so, you need to double
quote it i.e. put '' instead of ''
Dani
|
|
|
Re: Issue with apostrophes and NLS [message #464905 is a reply to message #464867] |
Tue, 20 March 2007 07:57 |
Anders Skarby Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Daniel Megert skrev:
> Anders Skarby wrote:
>
>> Daniel Megert skrev:
>>
>>> Anders Skarby wrote:
>>>
>>>> Hey guys (and girls),
>>>>
>>>> I'm having a major headache, concerning using Eclipse's NLS
>>>> mechanism, with text-strings containing 2 or more apostrophes.
>>>>
>>>> Take this example:
>>>> ------------------
>>>>
>>>> an entry, eg.
>>>>
>>>> Class.SOME_ENTRY=This is the dog's bone's arch nemesis
>>>>
>>>> gets returned through the NLS mechanism as the String:
>>>>
>>>> "This is the dogs bones arch nemesis"
>>>>
>>>> When only one apostrophe is in the String, it returns the String as
>>>> expected (that is, including the apostrophe).
>>>>
>>>> Can someone help me out, here?
>>>>
>>>> PS: Running Eclipse 3.2
>>>
>>>
>>> This works for me i.e. the NLS wizard creates this entry in the
>>> properties file:
>>> Key=This is the dog's bone's arch nemesis
>>>
>>> Dani
>>
>>
>> And what is your result, if you print it to the Console? I do also get
>> the correct entry in the properties file, this is not where the
>> problem lies - it's the output that's the issue.
>
> Do you run that string through MessageFormat? If so, you need to double
> quote it i.e. put '' instead of ''
>
> Dani
Nope, I don't run it through a MessageFormat, I use the String in a
ContentProvider - no formatting is used, what so ever.
Anders
|
|
|
Re: Issue with apostrophes and NLS [message #464965 is a reply to message #464905] |
Wed, 21 March 2007 09:31 |
Anders Skarby Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Anders Skarby skrev:
> Daniel Megert skrev:
>> Anders Skarby wrote:
>>
>>> Daniel Megert skrev:
>>>
>>>> Anders Skarby wrote:
>>>>
>>>>> Hey guys (and girls),
>>>>>
>>>>> I'm having a major headache, concerning using Eclipse's NLS
>>>>> mechanism, with text-strings containing 2 or more apostrophes.
>>>>>
>>>>> Take this example:
>>>>> ------------------
>>>>>
>>>>> an entry, eg.
>>>>>
>>>>> Class.SOME_ENTRY=This is the dog's bone's arch nemesis
>>>>>
>>>>> gets returned through the NLS mechanism as the String:
>>>>>
>>>>> "This is the dogs bones arch nemesis"
>>>>>
>>>>> When only one apostrophe is in the String, it returns the String as
>>>>> expected (that is, including the apostrophe).
>>>>>
>>>>> Can someone help me out, here?
>>>>>
>>>>> PS: Running Eclipse 3.2
>>>>
>>>>
>>>> This works for me i.e. the NLS wizard creates this entry in the
>>>> properties file:
>>>> Key=This is the dog's bone's arch nemesis
>>>>
>>>> Dani
>>>
>>>
>>> And what is your result, if you print it to the Console? I do also
>>> get the correct entry in the properties file, this is not where the
>>> problem lies - it's the output that's the issue.
>>
>> Do you run that string through MessageFormat? If so, you need to
>> double quote it i.e. put '' instead of ''
>>
>> Dani
>
> Nope, I don't run it through a MessageFormat, I use the String in a
> ContentProvider - no formatting is used, what so ever.
>
> Anders
Okay, two '' did the trick, even though I'm not running it through a
MessageFormat.
You saved my day - thanks for the persistant support. I greatly
appreciate it.
Anders, over-and-out!
|
|
|
Goto Forum:
Current Time: Fri Sep 20 23:33:00 GMT 2024
Powered by FUDForum. Page generated in 0.04773 seconds
|