[Home]

Summary:ASTERISK-06837: [patch] func_iconv - convert string from in-charset to out-charset
Reporter:Sven Slezak (sunny)Labels:
Date Opened:2006-04-24 09:43:40Date Closed:2007-05-28 10:59:17
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Functions/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20070528__func_iconv.c
( 1) func_iconv.c
Description:ICONV is an asterisk function for character conversion.
If you retrieve text from an external data source it might
be necessary to convert the source characters into a different
character set.

The syntax for ICONV is as follows:

ICONV(<input>|<from-charset>|<to-charset>)


****** ADDITIONAL INFORMATION ******

EXAMPLE:
exten => 1234,1,Set(CIDNAME=${ICONV(${CIDNAME}|ISO-8859-1|UTF-8)})  ; convert CIDNAME from UTF-8 into ISO-8859-1
Comments:By: Olle Johansson (oej) 2006-04-24 10:53:48

Thanks.
We need to convert this to a dialplan function. Regardless, it's a good start.

By: Jeffrey C. Ollie (jcollie) 2006-04-24 10:55:02

This would be *much* better as a function.

By: Serge Vecher (serge-v) 2006-05-04 11:11:24

sunny: can you please redo this as a function?

By: Sven Slezak (sunny) 2006-05-04 18:48:21

ok, its done.
app_iconv is now func_iconv

By: Jason Parker (jparker) 2006-05-04 19:33:49

(copied from bug:7085)

Please review and follow the coding guidelines listed in doc/CODING-GUIDELINES

Also, the module structure has been changed lately. Please update to latest svn trunk, to see the latest structure. (specifically, note the staticicity and constness (yes, I made the first word up), as well as the now removed usecnt (correct me if I'm wrong on this last one)).

By: Jeffrey C. Ollie (jcollie) 2006-05-04 23:52:26

Here's an update version of the iconv function.

1) Move ICONV() to func_strings.c - I don't think that a separate file is necessary.
2) Autoconf checks for iconv.
3) Uses new argument parsing macros.
4) Meets other coding guidelines.
5) Simplified to a single function.
6) Misc bug fixes.

By: Jason Parker (jparker) 2006-05-05 00:44:07

jcollie: You rock.  Can we get a few interested parties to test this?

By: Jeffrey C. Ollie (jcollie) 2006-05-11 12:16:33

The patch for func_iconv is now being maintained in branch asterisk/team/jcollie/bug7021.

By: Tilghman Lesher (tilghman) 2006-09-11 16:00:43

Do we have an update for this branch?  I see that the loader changes broke autocommit and there have been zero changes since then.

By: Jeffrey C. Ollie (jcollie) 2006-09-11 19:48:00

I didn't get much interest from the Digium crowd so I didn't see much point in maintaining it.  If there's an chance it'll get committed I'll update it (except that I'm going to be extremely busy this week).

By: jmls (jmls) 2006-11-01 05:07:46.000-0600

you seem to have a fair amount of interest in this issue history ("you rock" "good start") Please would you update this for trunk and we'll see if we can get it in. Thanks.

By: jmls (jmls) 2007-01-07 03:11:05.000-0600

any luck on the update, or shall we close it ? That would seem a pity...

By: Caio Begotti (caio1982) 2007-02-06 07:56:34.000-0600

Jcollie?

By: Sven Slezak (sunny) 2007-02-06 08:10:48.000-0600

Is func_iconv going into func_strings, now?
I updated func_iconv to Asterisk 1.4.

By: Serge Vecher (serge-v) 2007-02-07 11:03:23.000-0600

sunny: what's your disclaimer status?

By: jmls (jmls) 2007-05-28 02:36:45

ping. Sunny, were you able to answer serge-v's question about the disclaimer ?

Thanks

By: Tilghman Lesher (tilghman) 2007-05-28 09:12:58

I went ahead and updated the source file.  Note that we still need to devise a configure test for iconv library inclusion.

By: Tilghman Lesher (tilghman) 2007-05-28 10:59:17

Committed in 66278.