lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Latin-9 coding rules test


From: Vadim Zeitlin
Subject: [lmi] Latin-9 coding rules test
Date: Tue, 13 Nov 2018 22:30:30 +0100

 Hello,

 I'm looking at assay_non_latin() function in test_coding_rules.cpp because
the regex used there doesn't work with libstdc++ implementation of
std::regex, which converts \x9f to -97 and then throws std::regex_error
because it's not less than \x7f (127). I have my doubts about the
correctness of this code and it definitely doesn't make any sense to
handle char as signed in this context to me, but independently of whether
libstdc++ is correct or not, I wonder if this whole test makes much sense.

 The reason for this question is that lmi source files use UTF-8 encoding
and not ISO-8859-15, so why do we bother checking for the latter? I think
that we ought to check that the file contains valid UTF-8, as this is
actually useful, and maybe that it doesn't contain any control characters
except "\n" and, possibly, "\r" (why should "\f" or "\v" be allowed is not
very clear to me).

 What do you think about changing it like this?
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]