[Freeswitch-users] unicode in CDR

Cal Leeming [Simplicity Media Ltd] cal.leeming at simplicitymedialtd.co.uk
Mon Jan 7 18:41:54 MSK 2013


Ah, yeah dealing with unicode can be troublesome in many languages.

>From my understanding - if FreeSWITCH has done something a certain way,
then it will stay like that for the sake of backwards compatibility,
despite whether it was the right/wrong way of doing something (unless it's
an outright bug). You could push to have new variables defined with
deprecation on the old, but these sorts of tickets are extremely low
priority. Either way, this means that you probably won't see this being
changed in the code (at least not for quite a long time). Generally
speaking, the FreeSWITCH channel variables are not what a typical developer
would consider 'sane'... i.e. you might need to clean/convert/verify etc.

As Steven said, you can file a JIRA report, but unless the resulting data
is absolutely wrong, then the chances of it being changed are slim.

(If anyone thinks this is incorrect, please reply)

Cal

On Mon, Jan 7, 2013 at 3:19 PM, Seven Du <dujinfang at gmail.com> wrote:

> I tried to parse that in Erlang and the xmerl XML lib seems has bug on
> parsing the unicode identity where I can only get one character "会" where
> it should be "会议142248".
>
> But the real question is why it's different on different place in the XML
> with the same characters.
>
> Thanks.
>
> --
> Seven Du
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>
> On Monday, January 7, 2013 at 8:57 PM, Cal Leeming [Simplicity Media Ltd]
> wrote:
>
> Hi Seven,
>
> Could you elaborate more on "having difficulty parsing this"?
>
> What are you parsing it with?
> What are you trying to achieve?
> What should be happening vs what is actually happening?
>
> Etc.
>
> Cal
>
>
> On Mon, Jan 7, 2013 at 6:41 AM, Seven Du <dujinfang at gmail.com> wrote:
>
>  Hi
>
> We used Chinese UTF8 in chan vars and some times it's url encoded but
> sometimes in html entity, specifically in variables it's %xx but in
> caller_profile it's &#xxxx, all has the same "会142248".
>
> We have some difficulty on parsing this, any comment on this?
>
> <?xml version="1.0"?>
> <cdr core-uuid="c7d83a29-c498-4fff-b2ce-621e9fc21e94">
>   <variables>
>
> <origination_caller_id_name>%E4%BC%9A%E8%AE%AE142248</origination_caller_id_name>
>
> <origination_caller_id_number>%E4%BC%9A%E8%AE%AE142248</origination_caller_id_number>
>     <conference_name>%E4%BC%9A%E8%AE%AE142248</conference_name>
>
>     <caller_profile>
>       <caller_id_name>&#x4F1A;&#x8BAE;142248</caller_id_name>
>       <caller_id_number>&#x4F1A;&#x8BAE;142248</caller_id_number>
>
>
> Thanks.
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130107/5c546224/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list