NetTalk Central

Author Topic: UTF encoding in xFiles?  (Read 2239 times)

AtoB

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
UTF encoding in xFiles?
« on: November 29, 2016, 07:27:12 AM »
Hi all,

for my webservices I've written a class to handle JSON and I'm using xFiles to handle the XML output. I noticed that the xFiles produces "other" utf-8 than the json class.

for json I'm using StringTheory.ToUnicode method and I see that xFiles uses code in the ._WriteCurrentField procedure somewhere at the following comment line (around line 3010):

! -- Do UTF-8 Encoding ---

I think the StringTheory .ToUnicode method produces better UTF-8 output, as far as I can tell xFiles doesn't take into account what codepage it's originating from,  but I'm not entirely sure and by all means not an export with regard to encoding ...

Either way : one must be wrong ...

regards,
Ton

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: UTF encoding in xFiles?
« Reply #1 on: November 30, 2016, 04:34:07 AM »
>> Either way : one must be wrong ...

not necessarily...
but I agree the StringTheory version (which jFiles uses) is better.
But xFiles doesn't user StringTheory, and I'd need to officially make that a "requirement" in order to use it...

Cheers
Bruce