Message119245
| Author |
baikie |
| Recipients |
baikie, ezio.melotti, jesterKing, lemburg, loewis, vstinner |
| Date |
2010年10月20日.23:42:55 |
| SpamBayes Score |
3.255884e-08 |
| Marked as misclassified |
No |
| Message-id |
<20101020234248.GA4405@dbwatson.ukfsn.org> |
| In-reply-to |
<4CBF47DB.9080202@v.loewis.de> |
| Content |
> > Also, if GetComputerNameEx() only offers a choice of DNS names or
> > NetBIOS names, and both are byte-oriented underneath (that was my
> > reading of the "Computer Names" page), then presumably there
> > shouldn't be a problem with mapping the result to a bytes
> > equivalent when necessary?
>
> They aren't byte-oriented underneath.It depends on whether use
> GetComputerNameA or GetComputerNameW whether you get bytes or Unicode.
> If bytes, they are converted as if by WideCharToMultiByte using
> CP_ACP, which in turn will introduce question marks and the like
> for unconvertable characters.
Sorry, I didn't mean how Windows constructs the result for the
"A" interface - I was talking about Python code being able to map
the result from the Unicode interface to the form used in the
protocol (e.g. DNS). I believe the proposal is to use the DNS
name, so since the DNS is byte oriented, I would have thought
that the Unicode "DNS name" result would always have a bytes
equivalent that the DNS resolver code would use - perhaps its
UTF-8 encoding? |
|