Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

locale zh_CN incorectlly causes display of yen currency symbol

Not applicable
Thank you for taking the time to read my question. This is my first time using Livecycle Designer and I have no prior javascripting experience, so please be detailed if you have an answer for me and the other nubies who read this.

Summary: I am summing some numeric fields containing monetary values. I am scripting the locale of each fields so that the currency symbol changes based on a user selection from a drop-down. This is working for USD, Euro, and Pound. The 'Yuan' symbol which denotes the Chinese Renimbi displays as a Japanese Yen symbol. (In testing, the code for Japan also brings the Yen symbol)

* I am going to refer to currency symbols in the following description with $,L,E,R,Y for USD,POUNDS,RENIMBI,YEN, respectively because I am unsure they will display properly on this forum if I merely type them, or paste them in. Please bear with me.

Details: I have a drop-down list for the type of currency to be specified by the end user. Each currency displayed is bound to a locale code as follows. The locale codes themselves are found in the Livecycle Designer help file after searching for 'locale'.





The code that changes the locale on each of the individual text fields is in the calculate event and is described as follows:

this.locale = (SOM of the currency drop-down list).rawValue

I should mention the display pattern for these fields is num{($z,zzz,zz9.99)} which means that when the user selects POUNDS from the drop-down menu, and types '4566' into one of the numeric fields, 'L4,566.00' is displayed. This works for USD, EUROS, POUNDS & YEN but RENIMBI produces 'Y4,566.00'

Changing the font does not appear to help, but I am using Myriad Pro.

Adobe states the following about its basic fonts:

"These fonts also contain currency symbols (cent, dollar, euro, florin, pound sterling, yen)"


I see that the Yuan is not listed, but Livecyle Designer's help states the following

"A locale is a standard term used when developing international standards to identify a particular nation (language, country or region). For the purposes of FormCalc, a locale defines the format of dates, times, numeric, and currency values relevant to a specific nation or region so that users can use the formats they are accustomed to. Each locale is comprised of a unique string of characters called a locale identifier. The composition of these strings is controlled by the international standards organization (ISO) Internet Engineering Task Force (IETF), a working group of the Internet Society ("

There is no caveat about currency symbols, or other warning or frankly anything I could dig up on the web about this specific matter.

The way the currency symbol is associated with a locale appears to be internal to Acrobat and not scriptable, but I could be wrong. It seems to me, however, that no currency symbol should be placed into the display if none is available in the font, or, to be more specific, Acrobat should be looking for a different character, possibly a position in the font which is empty in Myriad Pro but which is occupied by the Yuan symbol in another font. It worries me that the Yen symbol is inserted because any font that actually has a Yuan symbol is likely to have a Yen symbol as well and if is in the same position in the font I don't see how it wouldn't still be displayed.

And just so you know, my client is a China based design company, the form is an order form and contract, the end user is a sales person that fills it out and it is 'printed' to PDF to remove all the buttons and interactivity by means of setting buttons visibility to screen only, and sent to the customer of my client for sign-off. These customers get a very polished looking document, only a small portion of which is the correct currency symbols for the currency they intend to pay by.

I really like th
0 Replies
Not applicable
(it appears there is a word or line limit because the following was cut twice from my post)

I really like the way this form works and am hoping to avoid long workarounds, but I will take any help I can get. But I am hoping whatever the solution may be, it doesn't break the following code which is also part of the form.

In the exit event of this drop-down I have the following code:

var currency_index currency_index = this.selectedIndex order_summary.currency.rawValue = this.getDisplayItem(currency_index);

This sets a text field to the display value of the drop-down (it took me a long time to figure out how to do this). Such that if the user has selected 'EURO' at the beginning of the form, a line of text before the total says 'Total Price in EUROS' This part works flawlessly and I would like to keep it, the client has seen this working in a earlier draft and will likely not be understanding if I have to scrap this part of the form.
Level 10
Level 10
I have investigated this with the support people and here is what I found. Note that I am not an expert in this area so I am para-phrasing:

if you use a Chinese font for the numeric field with the zh_cn locale, the Yen sign will change to the Yuan sign

I'm pretty sure XFA format Chinese (locale zh_CN) currencies using U+FFe5 which looks like ¥

Of course, this assume that the font in play is capable of displaying that glyph. Hopefully you're using an Adobe font like Adobe Minion pro or Myriad pro.

I think Chinese currency and Japanese currency use same character but when display it in different fonts the glyph will be different. In Character Map, using font SimSun, character U+FFE5 is displayed as
Not applicable
Hello Paul,

Thanks for the reply. From what you say it occurs to me to try the following:

add some script to change the font to a 'Chinese font' at runtime if the user selects Chinese currency.

But this is unlikely to work for Chinese fonts have the yen symbol at that codepoint and the yuan character is at U+5143

for a detailed discussion see

I probably will try to supply the currency symbol as the display value or value of the drop-down list and script that to appear in front of the currency. I foresee alignment issues. Might have to drop the symbols entirely and go for abbreviations at the right of the numbers.