Felix Frank <[email protected]> writes:
> On 10/25/2010 03:20 AM, Daniel Pittman wrote:
>> ...
>> If there is a custom hack on the PSON encoder then it is probably worth 
>> filing
>> a "one day" ticket to make it ship data without encoding anything outside
>> ASCII, since that isn't actually necessary and is much less efficient.
>
> I may be wrong, but I believe that's what happens already. The only
> escaping/encoding I can see is "UTF8-Multibytes" => "UTF16BE-Multibytes".

Hrm.  I went and checked just in case, and at least with Ruby 1.8 on OS-X 10.6
it is encoding everything outside ASCII into four-byte \u escapes: look at
lib/puppet/external/pson/pure/generator.rb:41 for utf8_to_pson, which does the
encoding work for String.

> All other bytes (including ASCII) are unscathed. Is your point about the
> UTF8->UTF16 bit?

No, about emitting a four byte, two character sequence as twelve bytes because
it gratuitously escapes things:

    puts utf8_to_pson("ÂĎ")
    => "\u00c2\u010e"

Regards,
        Daniel
-- 
✣ Daniel Pittman            ✉ [email protected]            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to