MeridianMERIDIAN

Currency Amount (Swiss Apostrophe)

finance.currency.amount_apostrophe

Swiss/Liechtenstein format using apostrophe for thousands separator and period for decimal. Supports both straight apostrophe (U+0027) and right single quotation mark (U+2019).

Worked samples

DuckDB 1.5.5 · finetype 0.6.64

ValueAs VARCHARnumeric_valuesymbol
CHF 1'234.561234.561234.56CHF
1'234.56 CHF1234.561234.56CHF
CHF 10'000.0010000.0010000.00CHF
-CHF 999.99-999.99-999.99CHF

Shape

Pattern
^(CHF\s?)?-?[0-9]{1,3}(['\x{2019}][0-9]{3})*(\.[0-9]{1,2})?(\s?CHF)?$
ValueLengthShape
CHF 1'234.5612not checked
1'234.56 CHF12not checked
CHF 10'000.0013not checked
-CHF 999.9911not checked

pattern uses syntax this checker does not support

Background

Origin

Wikipedia's article on decimal separators says that in Switzerland currency values use an apostrophe as the thousands separator along with a dot as the decimal separator, like 1'234'567.89.[1] Wikipedia's table of examples lists 1'234'567.89 for Switzerland (computing) and Liechtenstein.[1] Wikipedia's article on the apostrophe says that in Switzerland the apostrophe is used as a thousands separator alongside the fixed space in all four national languages.[2]

The Swiss Federal Chancellery's Schreibweisungen, its rules for German-language official federal texts, appeared in a second, updated edition in 2013.[3] The Schreibweisungen require a decimal point instead of a decimal comma between the currency unit and its subunit in money amounts, as in Fr. 23.50.[3] The Schreibweisungen say the formerly customary grouping with an apostrophe should no longer be used, because it has to be undone for printing.[3] Read the apostrophe form as an everyday and software convention for Swiss amounts rather than the house style of official federal prose. (Meridian's view)

Use

The Unicode code chart for General Punctuation notes that U+2019 RIGHT SINGLE QUOTATION MARK is the preferred character to use for apostrophe.[4] The GNU C Library's de_CH locale sets both its numeric and its monetary thousands separator to the curly right single quotation mark ’.[5] The GNU C Library's de_CH locale gives CHF as its currency symbol and a full stop as its monetary decimal point.[5] CLDR 48.2, released on 2026-03-17, updated the group separator for number formatting to ' in fr-CH, consistent with other Swiss locales.[6]

Wikipedia's article on decimal separators says the apostrophe is also the most common thousands separator for Swiss non-currency values, like 1'234'567,89.[1] An apostrophe in the digits does not settle the decimal mark, so check whether a file ends its numbers with a full stop or a comma before you parse it. (Meridian's view) The Schreibweisungen write a dash in place of the two zeros after the decimal point, as in Fr. 20.–, and in place of the single zero before it, as in Fr. –.15.[3] When cleaning Swiss amounts, strip the currency code and both apostrophe characters, look out for dashes standing in for zeros, and only then cast to a decimal, keeping two decimal places for francs and centimes. (Meridian's view)

Detection notes

New in format coverage expansion. Must handle both U+0027 (apostrophe) and U+2019 (right single quotation mark) as thousands separator.

Use it

CLI · DuckDB
$ finetype infer -i "CHF 1'234.56" --mode column
→ finance.currency.amount_apostrophe

SELECT ft_infer('CHF 1'234.56');
-- → 'finance.currency.amount_apostrophe'
Cast expression
CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, 'CHF\s?', ''), '[''\x{2019}]', '', 'g'), '\s+', '', 'g') AS DECIMAL(18,2))

Schema

https://meridian.online/schemas/finance.currency.amount_apostrophe · Frictionless type string

finetype taxonomy finance.currency.amount_apostrophe -o json-schema

Aliases

amount_chswiss_amount

Type Registry