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'.
USD en_US
EUROS en_GB_EURO
POUNDS en_GB
RENIMBI zh_CN
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)"
from
http://www.adobe.com/type/browser/info/glyphs.html 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 (www.isoc.org)."
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