persistence@glassfish.java.net

test required for bug3827 fix

From: Kyle Chen <xiaosong.chen_at_oracle.com>
Date: Wed, 07 Nov 2007 10:28:01 -0500

Hi there,

Can someone help to test the fix that I made for bug 3827 (require
multiple-bytes OS)? I manually tested and seems ok, I can send built
jars to the volunteer.

Cheers/kyle

Tom Ware wrote:
>
>
> -------- Original Message --------
> Subject: [Fwd: Re: nb issue 119567 and filing gf/toplink issue]]
> Date: Thu, 01 Nov 2007 09:17:05 -0700
> From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
> To: Tom Ware <tom.ware_at_oracle.com>
>
>
>
> Hi Tom,
>
> This is the description of how to setup a multy-byte env. Lert me know
> if you need more.
>
> thanks,
> -marina
>
> -------- Original Message --------
> Subject: Re: nb issue 119567 and filing gf/toplink issue]
> Date: Wed, 31 Oct 2007 07:53:55 -0700
> From: Ken Frank <Ken.Frank_at_Sun.COM>
> Reply-To: Ken.Frank_at_Sun.COM
> To: Sahoo <sahoo_at_sun.com>
> CC: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
> References: <47287285.4010301_at_Sun.COM>
>
> Sahoo,
>
> attached is the simple doc on setting up en windows xp to run in other
> locales -
> takes 5-10 minutes; all dev and others here have used it with no problem.
>
> before even doing that, set regional settings to some locale that is
> listed
> that uses non ascii characters, maybe from where you are located
> and have dir with those characters; the problem might show or not;
> it might take actual asian multibyte chars to show it; in that case
> follow the
> instructions in the doc.
>
> that is, any en xp comes with some other locales available, but adding
> the asian
> ones takes the additional 5-10 minute steps.
>
> also attached is 2 about solaris, but that means someone needs to install
> additional locales onto your solaris or new install with all locales -
> after that its easy to run in other locale; and having other locales
> installed
> has absolutely no impact on machine and in fact your machine prob has
> some of them already (ls /usr/lib/locale)
>
> Thanks - Ken
>
> Sahoo wrote:
>> Hi Ken,
>>
>> I don't have a m/c with other language support available to try out.
>> Do you have a system that I can login to and try out?
>>
>> Thanks,
>> Sahoo
>> Ken Frank wrote:
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
>
> How to setup english w2000 or XP to run in asian locales and to be
> able see and input multibyte characters
>
>
> Information provided by Ken Frank, Java Developer Tools I18N
> Quality and Testing Team
>
>
>
> Introduction
>
> First of all, this will not make your windows into a localized
> windows, and you will not usually see menus or windows in other
> languages nor will you thus need to be able to read or write another
> language.
>
> Secondly, it takes only 5 to 10 minutes to set up, and never has to be
> set up again; and I know various developers on different product teams
> have been using this setup more and more.
>
> This can be helpful for those dealing with i18n issues or development,
> since issues arise with use of multibyte that don't always show when
> using locales like european ones; thats why these instructions
> emphasize asian locales.
>
> Same principles apply to running in non Asian locales.
>
> Steps below refer to w2000; steps on xp same in general but some
> regional settings dialogs and items are slightly different than on
> 2000, but I think w2000 instructions do give the basic steps.
>
> Having the additional locales does not increase size used that much
> and does not affect anything on your machine or environment when you
> run in english locale.
>
>
> Setting up to run in other locales on Solaris and Linux
>
> There are related docs about how to setup and run on a solaris that
> has other locales installed - see
>
> http://dpweb.sfbay/teams/DeveloperTools_I18N/setuplocale.solaris.part1.html
> http://dpweb.sfbay/teams/DeveloperTools_I18N/setuplocale.solaris.part2.html
>
>
> For adding locales to linux, install those locale specific rpms and
> the asian fonts and input tools or you can choose to add them later
> using yast2 or your install disks. Then log in to the locale of
> interest, and its almost completely set up; I'll need to check and see
> if any additional steps are needed.
>
> Often, the installer will allow these kind of choices to be made as to
> which locales you want installed.
>
>
> Steps for setting up for windows
>
>
> To install asian fonts and input tools on windows:
>
> * get your Windows OS disk (we each should have a license for
> the windows we use, unless we use MSDN which has other licensing
> details, so being able to get the system disk as needed is ok,
> if you don't have it with you.
>
> * go to some web page in IE browser that shows Chinese fonts like
> cn.yahoo.com
> * choose view->encoding->more->simplified chinese (make sure its
> simplified chinese, not traditional as we are choosing mainland
> China now.
> * popup appears asking if you want to install language pack
> * choose install and then when asked insert the windows OS disk
> * windows should find the needed fonts and other files and install
> them.
> o you may need to explicitly point to dir where fonts are if
> can't be found automatically.
> * repeat steps above for japanese go to yahoo.co.jp choose
> view->encodings->Japanese autoselect item (you might need to
> choose view->encoding->more to see this item)
>
> (if japanese(autoselect) does not cause popup to appear then choose
> japanese (euc) and
> follow steps above
>
> * reboot machine just to be sure.
>
>
> * h. NOTE - in our products, sometimes, if the font is a bold
> font, it might now show as proper multibyte but as square boxes
> or rectangles.
>
> This could be that, although these steps install many asian fonts, it
> could be that the bold version of them don't include all the
> characters needed, or that jdk somehow maps the bold version of the
> font to a non asian font.
>
> This is not a bug in the product.
>
> for example, the new wizard for a java class has, on the first panel,
> the word Name and Location at top of right side of the panel, and word
> Steps on top of left side of panel. Both these words are in bold, and
> in my xp in simplified chinese locale, the translation of these words
> appear as square boxes, not as real multibyte.
>
> But in an actual localized asian windows, the fonts appear correctly,
> since its possible there are some additional fonts in it.
>
> So far, there have been just a few places where this behavior has been
> seen; feel free to contact me if you are ever unsure if an improperly
> shown font is related to this issue or might be some actual product
> issue.
>
> ------------------------------------------------------------------------
>
> *
>
>
> Set regional settings for locale and keyboard
>
> lets use simplified chinese as example
>
> control panel->regional settings - has several tabs
>
> * general tab - your locale - choose Chinese PRC
>
> choose apply
>
> * In any of these operations, do NOT choose Traditional Chinese,
> that is Taiwan and a different locale entirely; we don't
> localize our products for it yet.
>
> This will set your default locale to be simplified chinese but of
> course os messages and windows will still be in english since this is
> not a localized os, which is good as we still want to see os messages
> in english.
>
> * input locales tab - choose Add ...
>
> * in popup choose Chinese PRC as locale and Chinese (simplified -
> Zheng Ma as the Keyboard layout/IME
>
> choose apply
>
> * make sure to choose Zheng Ma and not US keyboard here.
>
>
> * after you download fonts/tools for Japanese, you can repeat
> these steps using for general tab choose Japanese and in input
> locales tab choose Japanese Japanse input system (IME-2000)
> ((at least on my w2000) (not US keyboard)
>
> choose apply
>
> * 6) whichever locale choice is made in general tab is now the
> current locale as viewed by the OS and you can now run in that
> other locale after doing step 7.
>
> * 7. additional important steps !!!
>
> o 7a) additional important step for w2000
>
> * on first tab, choose set default in lower left under language
> settings for the system
> * in the popup "Select System Locale, choose the same locale as
> was chosen at the top of the first tab under your locale for
> example, if you chose Simplified Chinese (PRC) in first tab,
> choose the same choice here
> * Maybe the first time, but definitely the second and later times
> you change this choice to one you have changed before, it will
> ask you 2 questions in popups, the questions are something like
>
> * do you want to use already installed files - yes or no ? answer yes
>
> * do you want to reboot machine (it needs that to take effect)
> answer yes
>
>
> o 7b) Additional important step for XP
>
> * choose the advanced tab of the regional settings and then choose
> "Language for non-Unicode programs" section popup - choose the
> very same locale/lang you chose in step 1) for example, if you
> chose Simplified Chinese (PRC) in first tab, choose the same
> choice here
>
> * Maybe the first time, but definitely the second and later times
> you change this choice to one you have changed before, it will
> ask you 2 questions in popups, the questions are something like
>
> * do you want to use already installed files - yes or no ? answer yes
>
> * do you want to reboot machine (it needs that to take effect)
> answer yes
>
> * 8) choose ok for all dialogs
> * reboot if it asks if you want to reboot
>
> --> These steps are important to ensure that some other parts of
> windows OS view the assigned locale correctly - this does not happen
> with just basic locale setting.
>
> * 9) reboot to make sure , and in fact, after doing step 7, you
> will need to reboot for it all to take effect, and its probably
> a good idea to reboot in any case.
>
> ------------------------------------------------------------------------
>
>
> I think setting whole OS to another locale is better than
> starting ide with lang/region/encoding args since product also
> deals with other servers and databases, and we want all of these
> to have sense of other locale, not just the ide.
>
> Also, this more clearly emulates what typical user of a language
> specific windows will have.
>
> (that is, don't start ide with the -J-D lang/locale/encoding related
> args)
>
> ------------------------------------------------------------------------
>
>
> How to input multibyte
>
> * aa. The best way for limited use is just to cut and paste !
>
> * Using wordpad
>
> * aa1. start wordpad
> * aa2. choose insert->date time
> * aa3. choose some format in the popup that has multibyte as part
> of it
> * aa4. now you can copy some of this text and paste into ide as
> needed.
> * bb. Or, get some text from a browser on page of other language
>
> for example, using Chinese locale as example, browse to cn.yahoo.com
> and get some page that has text that can be copied and pasted.
>
> Make sure IE view->encoding says Simplified Chinese.
>
> Same approach for japanese, go to www.yahoo.com.jp
>
> Then just copy some text and paste it into ide where needed.
>
>
> * Using windows input tools - this will vary depending on if
> using w2000 or XP
>
> * these steps were done on w2000 in Simplified Chinese locale.
> * in right corner of windows is some icon like EN or a red dot or
> a red/white/blue circle, depending on which input tab item set
> to default. You may have to look for this.
> * click left on it and you see choice of which input tools to use
> - EN, Japanese (red dot) or Chinese (red/white/blue circle)
> * choose the red/white/blue circle - on left side bottom is a
> small toolbar appears (maybe on right side)
> * open wordpad and leave cursor focus there
> * You may need to rechoose on right side, the red/white/blue circle.
> * in wordpad, type some letter like t
> * you should see a popup with some multibyte and numbers - this
> helps you build a multibyte string
> * choose 1 and you see the multibyte letter now in wordpad
> * go to another line and type letter "tack" and you see an
> evolving string appear and then a final popup asking to choose 1
> or 2 - choose 1 and another multibyte string appears. (dont type
> the quotes in "tack" )
> * what if I want to now type ascii characters ?
>
> go to the rectangular tool that has as its leftmost icon the
> red/white/blue circle and click on it - it changes to an A
>
> now you can type ascii.
>
> Its better to return to this ascii mode once you are done typing the
> chinese characters.
>
> But really the cut/paste method from web page is much easier.
>
> o Using Windows input tool for Japanese
>
> * for japanese, its a different tool with some different ways of
> invoking it; both these tools have many many options and styles
> of input, and really, cut and paste can suffice for what we need
> to do.
> * be in ja locale, that is, regional settings have been set as per
> previous instructions
> * on xp, the lower right footer has a blue box, maybe has en or jp
> or ch in it
> * left click and choose jp
> * notice that there is to right of jp, some red circle like icon,
> and to right of it, letter A
> * open a wordpad
> * left click on the A and choose the next to the top item (has
> letter K)
> * the letter A changes to some multibyte
> * go to wordpad and type these letters
>
> (you might need to focus in the wordpad first or rechoose the jp and K
> item under the A.
>
> t
> o
> r
> o
> space
> space
>
> * a popup appears with some choices of some multibyte
> * double click on the second one
> * those letters now in wordpad
> * go back to the lower right, and left click where the letter A
> had been, now choose the next to last item (with a letter D
> * then left click on the jp and choose en
>
> * you can save the wordpad file which now has multibyte.
>
>
>
>
> ------------------------------------------------------------------------
>
>
> How to run in asian locales and view and input multibyte data on
> your own solaris machine that has complete asian locales installed.
>
> Information from Ken Frank, Java Developer Tools I18N Quality and
> Testing Team
>
> (For linux, similar but not identical procedures exist, not discussed
> in this doc)
>
> (For mac, the process is a bit different but easier)
>
> NOTE - where it says below to send me a gif of this or that, it means
> to first ask people on your team who have already set this up for
> advice; if they don't know, then send your questions and gifs to the
> assigned single point of contact person on your team who is working
> with me; please don't send to me directly.
>
> ------------------------------------------------------------------------
> I assume you are using your own solaris machine where you can login at
> the console.
>
> If your own machine does not have the locales installed, but another
> does, then access that other machine via vnc and follow steps in this
> document.
>
>
> Assumption - that you have all needed locales installed on your
> own machine. Our ILM has lots of experience installing the
> locales; just file a ticket and say you want all locales installed.
>
>
> * It's not effecient or practical to install only some required
> packages for a given locale and this can lead to things not
> working correctly; after all we want to do what our customers
> are doing, and that is having all packages for any given locale
> installed.
>
> * DONT try to put them on to your machine yourself; its not easy
> to make sure all are installed unless you do some full install
> and choose all locales; we've seen many cases where it looked
> like ja/zh pkgs were installed but not enough were. It's better
> to have ILM install all needed locales.
>
>
> How do you know you have the locales installed ?
>
> * does cde login window give choices of ja or zh locales ? (if so,
> it probably means all is ok, but there are a few additional
> steps that can help make sure)
>
> here are some of those locales
> ja, ja_JP.PCK, ja_JP.UTF-8
> zh, zh_CN.GBK, zh_CN.GB18030, zh_CN.UTF-8
>
> (we are not using the zh_TW or other zh_ choices you see for this
> document - those are completely different locale than zh or zh_CN)
>
> * after you login, make sure your path has this in it
> /usr/openwin/bin
> /usr/dt/bin
> * after you login, go to /usr/lib/locale and see if this output
> happens
>
> ls -d ja* zh_CN*
>
> should be like:
> /usr/lib/locale/ja/
> /usr/lib/locale/ja_JP.PCK/
> /usr/lib/locale/ja_JP.UTF-8/
> /usr/lib/locale/ja_JP.eucJP/
> /usr/lib/locale/zh_CN.EUC/
> /usr/lib/locale/zh_CN.GB18030/
> /usr/lib/locale/zh_CN.GBK/
> /usr/lib/locale/zh_CN.UTF-8/
> and some more zh_CN......
>
> * go to /usr/openwin/lib/locale and see output of ls -d ja* zh_CN*
> should be about same as above
> * go to /usr/openwin/lib/locale/ja/X11/fonts and see output of
> ls - should be like
>
> 75dpi/
> TT/
> TTbitmaps/
> *UTF8/*
>
> for /usr/openwin/lib/locale/zh/X11/fonts
>
> 75dpi/
> TrueType/
> Type3/
> composite/
>
> * output of this command
>
> xset q
> (/usr/openwin/bin/xset)
>
> for the Font Path: part should have one or more paths with ja or zh in
> it, depending on what locale you logged into from login screen
>
>
> Steps on how to use other locales on solaris
>
>
> * in the login window of window system at your console, choose
>
> 1. cde as the window system (similar for jds)
> 2. see the languages choice and look at different lists of locales
>
> * here are some of those locales we need to focus on: ja,
> ja_JP.PCK, ja_JP.UTF-8, zh, zh_CN.GBK, zh_CN.GB18030, zh_CN.UTF-8
>
> * for this experiment, choose ja (then later choose zh.)
>
>
> * now you are logged in
> o . start a dtterm terminal - since the window system is in
> other locale now, the window menus might be in that other
> language so you might need to know which one brings up a
> terminal, like dtterm.
> o but if a terminal already open, just use it or start
> another one from it. the menu items of this terminal might
> have other language but that is ok for now.
> o . make sure your path has this in it
> /usr/openwin/bin
> /usr/dt/bin
>
>
> * if there is some terminal opened already, if it is xterm, then
> start a dtterm from it - since xterm cant display multibyte.
>
> *
> o . in dtterm - then enter
>
> *
> o echo $LC_ALL
> echo $LANG
>
> o .if value for LC_ALL and/or LANG is ja, or has ja in it,
> then this is ok. and let me know.
>
> if not, then type the following:
> setenv LC_ALL <nameoflocale that you logged into from cde login setenv
> LANG <nameoflocale>
>
> like for this experiment
> setenv LC_ALL ja
> setenv LANG ja
>
> and make sure these values have been set as noted.
>
> * . type date command (be sure you are using dtterm or gnone-terminal
>
> * if output of date command looks like asian characters, it
> probably is ok but make sure that it is correct by comparing
> with output on a machine that you know is setup already.
>
> if it does not look ok, it might be just that font path is not set,
> though it should be if you login to a certain locale - see section B.
> below.
>
>
> How to know what proper multibyte looks like ?
>
> * Its suggested you provide a gif to someone who knows what the
> proper mbyte should look like -- since it can be that it looks
> correct but is not - first do the steps below.
> o Assumption above and in rest of doc is that machine has
> had ALL asian locales installed ( and its good to get all
> euro and others installed also, it does not take that much
> room)
> o If a new solaris installation, make sure to request that
> all locales are installed. There is a choice given during
> solaris install process to choose which locales to install.
>
> * If need to update existing solaris, get locales installed by
> filing service desk request - our ILM group has experience in
> installing these.
> * its ok and preferred that all locales be installed, not just ja
> or zh ones.
> * if zh or ja ones installed, make sure all sublocales are installed
> zh, zh_CN.GBK, zh_CN.GB18030, zh_CN.UTF-8 ja, ja_JP.PCK,
> ja_JP.UTF-8
> * NOTE - installing these do not take up that much more room on
> your system nor do they interfere with you running applications.
>
>
> Are font paths set ok ?
>
> when you login to a locale, the fonts are supposed to be set for you -
> see the output of
> /usr/openwin/bin/xset q
> command and see if there are paths that match the locale you are in,
> and also view values of $LANG
> and $LC_ALL
>
>
> Can you see acccurate multibyte in a terminal ? assuming the
> fonts are set ok, lets do some
>
> 1. be in a dtterm or gnome-terminal.
> 2. type date command - does the result look correct ? You will
> need to compare this output to output on a machine you know is
> already set up ok.
>
> You might first need to setenv LC_ALL <nameoflocale>where
> <nameoflocale> is same value as $LANG
>
> 3. type some nonsense characters - if you are in zh or ja locale you
> will get some message that in english means "not found" but in other
> locale shows as multibyte characters. Again, you will need to compare
> to that on a machine you know is setup correctly.
>
>
> * if the output of 2 or 3 looks like
>
> blank (nothing at all)
> boxes
> question marks
> random ascii or punctuation or accented chaacters escaped mumbers like
> \245\232\.....
>
> then it can be that either the locale is not supported, that fonts are
> not found or some other reason.
>
> this is not correct. NOTE - do NOT use xterm for this experiment.
>
>
> C. How can I type multibyte into a terminal or app -using
> copy/paste
>
> * there is a OS tool to allow input/typing of asian characters
>
> when you login to other locale, it should be started for you:
>
> * assuming the tool has started, how do i input multibyte ?
>
> that info will be in part 2 of this document.
>
> * Do I need to use that tool to input multibyte - is there another
> way ?
>
> * for now you can use copy/paste - by typing date command or
> nonsense command, and copy/paste part of the result. In fact,
> copy/paste might be all you need to do. But be sure the locale
> your terminal is in is the same locale as your application is
> running in, or else the results will not be correct.
> * command "kanji" shows all the characters in ja locale, those can
> be used for copy/paste.
>
>
> I want to use a terminal in english locale anyway even though
> i am logged into other locale
>
> *
> 1.
> o from some dtterm, do the following
> o start another dtterm by doing the following in this
> first dtterm or gnome-terminal
> + type setenv LC_ALL C,
> + setenv LANG C,
> + dtterm &
> o now this new dtterm is in english locale
> o type date - it should show in english
> o then start your browser and other tools from this
> window and all messages will be in english.
>
> but remember, if you need to start product or app in other locale, use
> the terminal that has LC_ALL and LANG set to other locale, like zh or
> ja, not from this terminal you just set to use English.
>
>
> ------------------------------------------------------------------------
>
>
> How to input multibyte on solaris using input tools (vs copy/paste)
>
> Information from Ken Frank, Java Developer Tools I18N Quality and
> Testing Team
>
> I assume you are logged into solaris using locale choice part of login
> windows, like ja or zh, and that you have proven, that multibyte
> displays ok and that you are really in that other locale.
> (see setuplocale.solaris.part1 for information on that.
>
> 1.
>
>
> How to input multibyte Japanese using OS input tools
>
> NOTE - if you logged into solaris using locale choice, the tools
> should be started for you; to find out type ps -ef |grep htt in
> terminal and output should show some that have, for example,
> usr/openwin/bin/htt -if atok12 -xim htt_xbe
> htt_xbe -if atok12
>
> * if input tools not started already, be in one dtterm
>
> o for Japanese for solaris 9 or 10
>
> /usr/openwin/bin/atok12setup
> /usr/openwin/bin/htt -if atok12 -xim htt_xbe &
>
> wait for htt or atok8 icon to come up, could take 30 seconds or so
> (or wait for the atok icon to come up) maybe at bottom right of screen
>
> then start another dtterm and use that one, not the one you just typed in.
>
> * how to input multibyte japanese, in dtterm
>
> if the input tools have started, you will see a small box at bottom
> left of dtterm - if not let your assigned contact person know as it
> means tools not started. in the dtterm - to input Japanse multibyte -
> follow these steps: and follow exactly
>
> 1. type Ctrl/Space and a small window below dtterm changes letters
> * still in dtterm type lower case "toro" (not the quotes)
> * then type Ctrl/N, then Ctrl/Space
> * you will see some multibyte in the window
> * you can now type ascii as usual
>
> ctrl /space turns on/off the input of multibyte vs input of ascii
> only. o
>
> how to input another group of multibyte Japanese characters
> Ctrl/space
> "toyota"
> ctrl/K
> ctrl/space
>
> (in this case, the ctrl/k commits it vs the ctrl/n before)
>
> another one
> ctrl/space
> "nihongo"
> ctrl/n
> ctrl/space
>
>
> ------------------------------------------------------------------------
>
>
> 2. how to input Chinese using input tools
>
> 1. NOTE - input tool should have been started when you logged in
> via language choice
>
>
> * how to start input tools if not started on solaris 8 htt
> -lc_basiclocale zh_CN.EUC &
>
> on solaris 9 or 10, in one dtterm
> htt -if cle -xim htt_xbe &
>
> start another dtterm and use that one
>
> * how to input zh on solaris 9 or 10 - follow steps exactly
>
> * in dtterm, cntl/space, see mbyte in small window at bottom of
> dtterm change
> * also, somewhere on your desktop is im toolbar with some icons
> like a quarter moon
> * type letter 'a'
> * see choice box below with choices 1-7
> * type 1 (or click at the 1)
> * see mbyte appear in dtterm
> * cntl/space
> * return
>
> Now the multibyte should be showing properly, and you are back in
> ascii only input mode.
>