[webkit-dev] Rename wtf/unicode/UTF8.h

Darin Adler darin at apple.com
Wed Oct 31 09:51:52 PDT 2018


> On Oct 31, 2018, at 7:52 AM, Konstantin Tokarev <annulen at yandex.ru> wrote:
> 
> 31.10.2018, 05:18, "Fujii Hironori" <fujii.hironori at gmail.com <mailto:fujii.hironori at gmail.com>>:
>> wtf/unicode/UTF8.h is conflicting with ICU header in MSVC builds. I'd like to rename wtf/unicode/UTF8.h to wtf/unicode/WTFUTF8.h.
>> Any suggestion?
> 
> What about Unicode.h or UnicodeHelpers.h? UTF8.h deals with UTF16 as well


While I don’t love other of those names, I do like the idea of avoiding awkward “WTF” in the filename.

I don’t think it’s right to say “deals with UTF16”; this header contains only functions about dealing with UTF-8 and converting UTF-8 to and from other encodings (and yet those other encoding include UTF-16).

With a few seconds thought I am thinking that maybe UTF8Conversion.h or UTF8Transcoding.h are possible better ideas for new names. Neither is completely accurate. If we were going to add the word “helpers” than I would say UTF8Helpers.h, but I really don’t like those kinds of word in header names (“utilities”, “helpers”, “functions”, “classes”).

A separate issue once we rename: the header is also pretty old and crufty. Eventually we might want to remove or refine the functions in here. Not sure how widely they are used.

— Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20181031/506f848a/attachment.html>


More information about the webkit-dev mailing list