mirror of
https://gitee.com/dgiiot/dgiot.git
synced 2024-12-04 21:27:39 +08:00
fix:iconv failed
This commit is contained in:
parent
6c0561d858
commit
83bdf7dbae
@ -18,7 +18,7 @@
|
|||||||
%%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
%%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
%%% THE SOFTWARE.
|
%%% THE SOFTWARE.
|
||||||
|
|
||||||
-module(dgiot_iconverl).
|
-module(iconverl).
|
||||||
|
|
||||||
-on_load(load_nif/0).
|
-on_load(load_nif/0).
|
||||||
|
|
||||||
@ -57,6 +57,6 @@ load_nif() ->
|
|||||||
end.
|
end.
|
||||||
|
|
||||||
test() ->
|
test() ->
|
||||||
{ok, M} = iconverl:conv("gbk", "utf-8", unicode:characters_to_binary(<<"在线"/utf8>>)),
|
{ok, M} = conv("gbk", "utf-8", unicode:characters_to_binary(<<"在线"/utf8>>)),
|
||||||
{ok, DevAddr} = iconverl:conv("utf-8", "gbk", M),
|
{ok, DevAddr} = conv("utf-8", "gbk", M),
|
||||||
io:format("DevAddr ~p ",[ unicode:characters_to_binary(DevAddr)]).
|
io:format("DevAddr ~p ",[ unicode:characters_to_list(DevAddr)]).
|
Loading…
Reference in New Issue
Block a user