• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Wrong thousand separator in num.toLocaleString("de-CH") - should be apostrophe not single quote

Community Beginner ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

Hi

 

I noticed with font Monteserrat that the thousand separator in the num.toLocaleString("de-CH") looks wrong. It should look like a little straight line and not a comma. It looks like the single quote is being used instead of the apostrophe. 'The apostrophe exists in the font so I'm sure the problem is with the implementation in AfterEffects. I hope this gets corrected!

 

U+0027 ' APOSTROPHE (')


For reference: https://en.wikipedia.org/wiki/Decimal_separator#:~:text=Switzerland%3A%20There%20are%20two%20cases,%....

Image: Blue output from expression, number counting up, yellow just static text showing the difference in separator.

Bug Acknowledged
TOPICS
Expressions

Views

576

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Pinned Reply

Adobe Employee , May 22, 2023 May 22, 2023

Hi @jnsdebraekeleer,

Thank you for reporting this issue. This appears to be an issue within the V8 JavaScript engine, the Montserrat typeface itself, or perhaps the glyphs Montserrat assigns within Adobe products.

 

E.g. if I run "(12345).toLocaleString("de-CH")" in the JS Console of Chrome, the return value is '12’345', using the curved single-quote for the thousands-separator rather than the apostrophe. Copying that string into AE or Illustrator also will continue to use the curved single-quot

...
Status Acknowledged

Votes

Translate

Translate
2 Comments
Adobe Employee ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

Extendscript is a very old dialect of javascript and you are using the modern API.

 

It appears you have to set the locale on the $ object, and then everything flows from that.

 

script.do var n = Number(123.56); $.locale ="de"; n.toLocaleString();

Scripting Result - 123,56

 

Douglas Waterfall

After Effects Engineering

Votes

Translate

Translate

Report

Report
Adobe Employee ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

LATEST

Hi @jnsdebraekeleer,

Thank you for reporting this issue. This appears to be an issue within the V8 JavaScript engine, the Montserrat typeface itself, or perhaps the glyphs Montserrat assigns within Adobe products.

 

E.g. if I run "(12345).toLocaleString("de-CH")" in the JS Console of Chrome, the return value is '12’345', using the curved single-quote for the thousands-separator rather than the apostrophe. Copying that string into AE or Illustrator also will continue to use the curved single-quote.

 

We will look into addressing this issue within the JavaScript engine, but a workaround, for now, would be to use "replace()" to substitute a straight apostrophe for any curved quotes, as shown in the expression snippet below:

var num = 1000000;
num.toLocaleString("de-CH").replace(/’/g, "'");

 

Thanks again for reporting this issue,

- John, After Effects Engineering Team 

Status Acknowledged

Votes

Translate

Translate

Report

Report