Switch from camomile to uu*#74
Conversation
|
I wonder if @dbuenzli has any ideas here. |
|
Not exactly sure about the context. But converting an |
|
Not that I'm aware of. |
|
Just to be clear, even if we support Latin-1, we will no longer support any other Windows codepage, so this requires a decision. |
|
As what I've already known, it's not only Latin-1 that is widespread, a lot of encodings are in use among the world depending on the system locale. For example, there are several hundreds million windows computers of which their console's encoding is cp932(JP) or cp936(CN). |
|
To replace camomile in zed, an abstract editing engine, is a good idea. But to do so with lambda-term, in my opinion, should be considered twice. |
|
Removing some windows support is really problematic, it's one of lambda-term's strength that everything is multiplateform out-of-the-box. |
I agree; if we still want to switch |
|
If the windows mappings are the only problem note that the actual data can be found here (I had the project to expose these mappings in the uucp package or in another package but somehow never got round to it). |
|
Just to note: Windows users can choose to use Unicode in any console window if they want to. Not wanting to support all the world's encodings doesn't mean a Windows user is out of luck. |
Actually it is more complicated than that. |
|
I made some modifications to the patch so that |
|
BTW, the CI build is failing. |
Yes, this requires ocaml-community/zed#16 |
With these mappings, to get rid of camomile is fairly straightforward. But if to do so will introduce another burden which is of big size... |
|
Minor, unimportant: camomile's license is a bit more restrictive |
|
Unless that changed camomile relies on Unicode 3.2 which is getting pretty old, quite a few ten of thousands characters and dozens of scripts have been added since then. However this fact may not be a problem for what lambda term is doing (I don't know).
I certainly don't have a grasp of all these details but note that trying to make things work out-of-the-box will not necessarily lead to a better end-user experience. If we take the toplevel as an example, PR like ocaml/ocaml#1231 firmly put the toplevel to expect an UTF-8 environment (you have to set The conjunction of these two facts may lead you to see more |
|
BTW, it occurs to me that the real expert on Windows console support is @dra27 and it might be a good idea to ask his opinion. |
|
Only glancing at this, but the output mode of the console is not something you have to live with on Windows, it's something you can define. So if lambda-term wishes to output UTF-8, then all it has to do is use There are obscure gotchas with enabling UTF-8 on older Windows, especially for input, although it starts to become quite academic from next year when Windows 7 exits support. |
|
@dra27 Is there a way to make that call from within OCaml easily? |
|
This needs updating, but I don't have the time at the moment. |
This is a companion PR to ocaml-community/zed#16, swapping out
camomileforuu*. The main issue that needs working out is thatuutfonly supports conversion intoThis means that the "outgoing encoding" of
lambda-termmust be one of these. This is probably not a big deal on Linux where UTF-8 usage is pervasive, but on the Windows console Latin-1 is widespread and this would not be supported anymore./cc @Drup @diml