Re: Does mbutils.c really need to use L'\0' ? - Mailing list pgsql-hackers

From Takahiro Itagaki
Subject Re: Does mbutils.c really need to use L'\0' ?
Date
Msg-id 20100707123544.97EF.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Does mbutils.c really need to use L'\0' ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Does mbutils.c really need to use L'\0' ?
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> >> I'm dubious that it's worth the trouble.  I suggest that it might be
> >> best to replace these usages of L'\0' by plain scalar 0.
> I'd tend to go with just 0,
> which is a reasonably common substitute for non-wide '\0' ...

I think all of the following codes work in the same way
at least on Windows, where the codes are actually used.
   utf16[dstlen] = L'\0';   utf16[dstlen] = '\0';   utf16[dstlen] = 0;   utf16[dstlen] = (WCHAR) 0;

Regards,
---
Takahiro Itagaki
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Bug? Concurrent COMMENT ON and DROP object
Next
From: Rajanikant Chirmade
Date:
Subject: multibyte-character aware support for function "downcase_truncate_identifier()"