There is no way, how to determine the encoding of the passed-in string 
value. There are some heristic methods, but generally (and especialy for 
shorter strings) it is not possible to guess the encoding.

You have to recode your values yourself. we're planning to publish 
internal recoding functions used in the core engine, this should make 
your life easier.

Perhaps we could extend the API with a call like SablotAddParamEnc, 
which could take a encoding identifier as additional parameter.

Other way is to put all your params in one small XML file of any 
necoding and use the document function to access them (as Petere 
suggested in his message).

Pavel

Martin Pedak wrote:

> That was i affraid of. And if the encoding is other than utf-8, if the 
> encoding is like iso-8859-1 and i pass values like "����" then i get 
> some weird chars, right ?
> 
> So what is needed is that chars must be convertet to the utf-8 if it is 
> not. Can you use iconv for this? Determine at first, in wich encoding 
> string is and then encode it to utf-8 ?
> 
> Pavel Hlavnicka wrote:
> 
>>
>> utf-8
>>
>> sorry for the delay. Generally there is no other choice, I guess. The 
>> first idea I had after reading your mail was, that parameter could be 
>> processed in the same encoding as the stylesheed it is refered from, 
>> but xsl:include disallows this approach.
>>
>> Pavel
>>
>> Martin Pedak wrote:
>>
>>> Hi.
>>>
>>> I posted some weeks ago one question where i asked about encodings of 
>>> the parameters, but nobody answered...
>>>
>>> So question remains. In wich encoding sablotron reads parameters & 
>>> parameter values?
>>
>>
>>
>>
>>
> 
> 



-- 
Pavel Hlavnicka
Ginger Alliance
www.gingerall.com

Reply via email to