Question
· Nov 12, 2019

What's the default charset encoding used for CSP files?

Pretty straight forward.

I'm tempted to hard-code ISO-8859-1 inside my VSCode extension when working with CSP because this seems to be the encoding used by default, but I need to know if there's any other possible configuration. So can you share your experience when working with CSPs? Like issues with encoding, discoveries regarding it, workarounds etc.

Also, can someone tell me if it's possible to work with UTF-8 encoded CSP files using Atelier without breaking the encoding of the output file?

Discussion (3)0
Log in or sign up to continue

Ahh I see, and what does it assume if there's no value defined there? I just zwrite'd it to check if there was any.
Does it also modifies what the default Apache sets in the Content-Type?

Checking for the following lines in %CSP.Routine:

            If charset="" {
                Set charset=##class(%SYS.NLS.Table).GetCSPTable()
                If charset="" Set charset=$get(^%SYS("CSP","DefaultFileCharset"))
            }
            If charset'="" {
                If ##class(%Net.Charset).TranslateTableExists(charset) Set i%TranslateTable=##class(%Net.Charset).GetTranslateTable(charset)
            }

seems to mean that the RAW TranslateTable is used when none is located. Which charset does RAW defaults to?

EDIT: I checked your answer because you already gave me a lead. Also, looks like ISO-8859-1 is indeed RAW.

w ##class(%Net.Charset).GetTranslateTable("iso-8859-1")
RAW