[Libreoffice-commits] core.git: tell msvc our source code is written using utf-8

Mark Hung marklh9 at gmail.com
Sat Aug 26 13:03:19 UTC 2017


Hi Stephan,

I always convert Chinese string to \uXXXX form, and refrain from
using non English characters directly.

I believe that allows others who don't know my language to help me,
or at least do not make them confuse when reading the code.

Another issue is that developers might not install the necessary font to
read them, that developers see different contents when reading the same
code.

So I think using actual Unicode content is an bad idea.

Best Regards



An

2017-08-24 21:04 GMT+08:00 Stephan Bergmann <sbergman at redhat.com>:

> On 08/17/2017 10:33 AM, Stephan Bergmann wrote:
>
>> Are we confident that all relevant toolchains treat C++ source files as
>> UTF-8 now?  How about e.g. Linux, where I could imagine that GCC/Clang
>> would base their behavior on LC_* env vars?
>>
>
> Turns out GCC/Clang have a corresponding flag, now set with <
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=30
> 935cf8adf8747b46ea485ba4a320b542a4f7a5> "Explicitly specify
> -finput-charset=UTF-8 for GCC/Clang".
>
> That means that if all agree that UTF-8 encoded C++ source files are a
> good idea, we can now use actual Unicode content (instead of \uXXXX,
> \UXXXXXXXX escapes) in u8/u/U string literals on master.
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>



-- 
Mark Hung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20170826/d627346d/attachment.html>


More information about the LibreOffice mailing list