[webkit-help] Errors in LocalizedStrings.cpp: newline in constant

Benjamin Poulain benjamin at webkit.org
Mon Jan 13 16:43:45 PST 2014


On 1/13/14, 12:06 AM, Moon wrote:
> With gcc installed and some other minor problems fixed, I've managed to
> build WebKit-r161524 (2014-01-09 02:29:27 GMT) on 10 January. I posted
> my build experience on
> http://blog.csdn.net/lzl124631x/article/details/18098361. (I also posted
> my question on stackoverflow but it turned out to be a tumbleweed.)
>
> I still have one more question. I met the same error message as one year
> earlier when I built WebKit for the first time. The error message and my
> solution are as below.
> ------------------------------------------------------------------------
> Error Message:
>       ..\platform\LocalizedStrings.cpp(248): error C2001: newline in
> constant
> Or
>       ..\platform\LocalizedStrings.cpp(250): error C2001: newline in
> constant
> Solution:
>       Open Source/WebCore/platform/LocalizedString.cpp, search "Look
> Up", delete the DOUBLE-BYTE double quotation marks around “%@” and
> “<selection>”.
> ------------------------------------------------------------------------
> This problem is caused by the double-byte double quotation marks around
> %@ and <selection>. I just deleted the marks and the error was gone.
> However, I don't think this is a "real" error otherwise the WebKit team
> must have noticed it and had it fixed. Maybe this problem is cause by
> the default character encoding method of my environment (My system
> locale is Chinese) but I'm not sure about that.
>
> Could anyone give me some hints on why I met this problem and how to fix
> it in the right way? Thanks!

It looks like your VS2013 is not decoding the files with UTF-8 for some 
reason.

I am not familiar with Visual Studio. Maybe there is a setting for the 
file encoding/decoding?

Alternatively, you could modify the original source to remove the UTF-8 
characters and modify the translation files to add them back.

Benjamin


More information about the webkit-help mailing list