Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > MessageFormat with apostrophe's

Reply
Thread Tools

MessageFormat with apostrophe's

 
 
Panda
Guest
Posts: n/a
 
      09-02-2003
I'm trying to use MessageFormat with text that has apostrophe's.

My text is

Payé depuis le début de l''année, exercice financier {0}


but MessageFormat isn't returning the text with the apostrophe -
instead I get
Payé depuis le début de lannée, exercice financier 2003 (after the
substitution)

My call in the code is :

MessageFormat.format(lm.getLabel(50923, userLangLower),currentYrArray)

I'm wondering if anyone else has had this problem and if so how do I
format the initial text before passing it in to the MessageFormat.

I tried - Payé depuis le début de l''année, exercice financier '{'0}
like the javadoc implied but that didn't work.

Thanks.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      09-02-2003
On 2 Sep 2003 13:32:32 -0700, (Panda)
wrote or quoted :

>Payé depuis le début de l''année, exercice financier {0}


try \' instead of '' if this starts out as a Java string literal.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
spring MessageFormat markelmel@yahoo.com Java 0 02-08-2006 03:18 PM
any EL-like MessageFormat-like classes? Ittay Dror Java 1 07-29-2004 05:38 PM
Re: MessageFormat boolean and hex Jon A. Cruz Java 2 08-10-2003 12:22 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57