Sublime Forum

"Fallback_encoding" & builder "encoding" parameter notation discrepancy?

#1

Hi.
Please excuse my poor English.
I’m evaluating sublime text build 3126 x64 on Win 10 x64.
So far its great :smiley:
I think I noticed a bug with the config options,
sorry if it has been reported before(?),
I didn’t find any similar posts.
My use case is primarily to edit/run rebol scripts.
Given that rebol 2.x doesn’t speak unicode,
I’m stuck with legacy encodings.
In my case (Greek Windows) in Python-speak
its either CP1253 or Windows-1253 or Greek (Windows 1253),
all referring to the same encoding offc.

So, after a lot of tries I have a config that mostly works:
@ Preferences.sublime-settings I set:
“fallback_encoding”: “Greek (Windows 1253)”

and @ my custom rebol.sublime-build I set:
“encoding”: “cp1253”

According to documentation,
the above options should(?) accept as parameter the python encodings
(I suppose either codec name or alias?).
So far so good, and it plays nice with the above settings,
but the codec name and aliases can’t be used interchangeably in the 2 files.

If in my rebol.sublime-build I set “encoding”: “Greek (Windows 1253)”
I get no console output, but plays nice with the “cp1253” notation
and “windows-1253” notation.

If in my preferences.sublime-settings I set
“fallback_encoding”: “cp1253” or “windows-1253”
sublime text doesn’t fallback to 1253 but it understands the
“Greek (Windows 1253)” notation.

Can it be a bug?
Known issue maybe?
Further documentation on the help about the supported encodings,
and preferred/supported notation would be nice.

0 Likes

#2

The encoding set in the build system is interpreted by python, as you correctly assumed. The setting for st itself is parsed internally, which means it’s an entirely different system. It’s a bit unfortunate, I agree, so maybe a mapping from ST’s encoding names to Python’s and vice versa could be implemented. Feel free to create an issue on the github tracker for this, if there isn’t one for this already, which I think it isn’t.

2 Likes

#3

Nice, good to know its a known issue.
Unfortunately, i don’t have an account on github,
and 0 knowledge working with git/github,
it’s on my to-do list,
but for now maybe one of the devs could please create an issue?
Thanks.

0 Likes