William ZHANG wrote:

It's safe, because you'll be dealing with prosrc inside the backend,
therefore using a backend-legal encoding, and those don't have any ASCII
aliasing problems (all bytes of an MB character must have high bit set).

The lower byte of some characters in BIG5, GBK, GB18030 may be less than
0x7F and don't have the high bit set. Fortunately, they don't use 0x0D and
0x0A (CR and LF).

Those are client-only encodings, precisely for this sort of reason, and thus not relevant to the present discussion. As Tom points out above, when the language handler gets the code it will be encoded in the relevant backend encoding which can't be any of these.

(Side note: the restriction by the R parser to unix-only line endings is a dreadful piece of design. As Jon Postel rightly said, the best rule is "Be liberal in what you accept and conservative in what you send." Just about every parser for every language has been able to handle this, so why must R be different?)



---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at


Reply via email to