<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi !
>
> I want to get the WMI infos from Windows machines.
> I use Py from HU (iso-8859-2) charset.
>
> Then I wrote some utility for it, because I want to write it to an XML
> file.
>
> def ToHU(s,NoneStr='-'):
>if s==None: s=Non
At some point you have to convert - esp. when writing data out to file.
If you receive data as a byte string and have to store it as a byte
string, it is sometimes convenient to *not* convert in the middle.
Best Regards,
Fuzzy
http://www.voidspace.org.uk/python
--
http://mail.python.org/mailman
[EMAIL PROTECTED] wrote:
> Hi !
>
> I want to get the WMI infos from Windows machines.
> I use Py from HU (iso-8859-2) charset.
>
> Then I wrote some utility for it, because I want to write it to an XML file.
>
> def ToHU(s,NoneStr='-'):
> if s==None: s=NoneStr
> if not (type(s) in [type(
[EMAIL PROTECTED] enlightened us with:
> I want to get the WMI infos from Windows machines.
> I use Py from HU (iso-8859-2) charset.
Why not use Unicode for everything?
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't
[EMAIL PROTECTED]
| I want to get the WMI infos from Windows machines.
| I use Py from HU (iso-8859-2) charset.
OK, there are people better placed than I to explain
about Unicode. Check out the following article, for
example:
http://www.joelonsoftware.com/printerFriendly/articles/Unicode.html
b
Hi !
I want to get the WMI infos from Windows machines.
I use Py from HU (iso-8859-2) charset.
Then I wrote some utility for it, because I want to write it to an XML file.
def ToHU(s,NoneStr='-'):
if s==None: s=NoneStr
if not (type(s) in [type(''),type(u'')]):
s=str(s)
if type