[closed] Re: BUG: utf-8 strings with log:N3String

Fix checked in to cvs.
The test is http://www.w3.org/2000/10/swap/test/regression.n3#t1009ab



Yosi


> Yoshio FUKUSHIGE wrote:
> 
>>
>> Hi,
>>
>> With
>> ---------
>> @prefix log: <http://www.w3.org/2000/10/swap/log#>.
>>
>>
>> {{:a :b :c} log:n3String ?x} => {?x a :interesting}.
>> ---------
>> , it works.
>>
>> i.e. I get (with --think option)
>> ---------
>> @prefix : <#> .
>>
>> """ @prefix : <file:/cygdrive/c/home/gomi.cwm#> .
>>
>> :a :b :c .
>>
>> """ a :interesting .
>> ---------
>>
>> However,
>> with
>> ---------
>> @prefix log: <http://www.w3.org/2000/10/swap/log#>.
>>
>>
>> {{:あ :b :c} log:n3String ?x} => {?x a :interesting}.
>> ---------
>>
>> I get an error message
>>
>> ---------
>> File "/usr/local/cwm-1.0.0/swap/notation3.py", line 1173, in writeEncoded
>> return self._writeRaw(str.encode('utf-8'))
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position
>> 64: ordinal not in range(128)
>> ---------
>>
>> I also get the same error message when I replaced the original :c with
>> literal "う".
>>
>> Is this a bug?
>>
>>
> It looks like a bug to me.
> 
> Yosi

Received on Tuesday, 31 May 2005 19:49:27 UTC