Bug 14801 - UTF-16LE is not supported in Kirkstone
Summary: UTF-16LE is not supported in Kirkstone
Status: RESOLVED NOTABUG
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: connectivity (show other bugs)
Version: 4.0
Hardware: Other arm64
: Undecided critical
Target Milestone: ---
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2022-05-13 10:38 UTC by Chen Feng
Modified: 2022-05-26 14:38 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Feng 2022-05-13 10:38:38 UTC
Hi friend,

There is libmtp-1.1.17 in the Kirkston version, libmtp1.1.17 supports UTF-16LE, but the Kirkston version of glibc does not support UTF-16, is it a bug? Or which lib or tools do I need to enable to support UTF-16LE?

root# mtp-detect
libmtp version: 1.1.17
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is a Google Inc Nexus/Pixel (MTP+ADB).
Found 1 device(s):
Google Inc: Nexus/Pixel (MTP+ADB) (18d1:4ee2) @ bus 4, dev 3
Attempting to connect device(s)
LIBMTP PANIC: Cannot open iconv() converters to/from UCS-2!
Too old stdlibc, glibc and libiconv?
Unable to open raw device 0
OK.

root:~# ls -l /lib64/libc-2.31.so
-rwxr-xr-x 1 root root 1474664 Apr 27 12:24 /lib64/libc-2.31.so

root:~# iconv --list
The following list contains all the coded character sets known.  This does
not necessarily mean that all combinations of these names can be used for
the FROM and TO command line parameters.  One coded character set can be
listed with several different names (aliases).

  10646-1:1993, 10646-1:1993/UCS4, ANSI_X3.4-1968, ANSI_X3.4-1986, ANSI_X3.4,
  ASCII, CP367, CSASCII, CSUCS4, IBM367, ISO-10646, ISO-10646/UCS2,
  ISO-10646/UCS4, ISO-10646/UTF-8, ISO-10646/UTF8, ISO-IR-6, ISO-IR-193,
  ISO646-US, ISO_646.IRV:1991, OSF00010020, OSF00010100, OSF00010101,
  OSF00010102, OSF00010104, OSF00010105, OSF00010106, OSF05010001, UCS-2,
  UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UCS2, UCS4, UNICODEBIG,
  UNICODELITTLE, US-ASCII, US, UTF-8, UTF8, WCHAR_T
Comment 1 Chen Feng 2022-05-22 08:22:57 UTC
Hi friend,
 any updates ?
Comment 2 Jagadeesh Krishnanjanappa 2022-05-23 12:37:29 UTC
You need to install glibc-gconv-utf-16 package to get UTF-16 format.

Example:
Without glibc-gconv-utf-16:
root@qemux86-64:~# iconv --list | grep -i utf-16
root@qemux86-64:~#


With glibc-gconv-utf-16:
root@qemux86-64:~# iconv --list | grep -i utf-16
UTF-16//
UTF-16BE//
UTF-16LE//
root@qemux86-64:~# 

Regards,
Jagadeesh
Comment 3 Chen Feng 2022-05-24 14:42:10 UTC
Hi Jagadeesh

Thanks for your reply, in yocto, how should I enable it(glibc-gconv-utf-16)

https://git.openembedded.org/meta-openembedded/tree/

I am using Qcom's auto-arm64. It seems that without this bb file, it can be enabled directly

Thanks
Feng
Comment 4 Jagadeesh Krishnanjanappa 2022-05-24 14:53:02 UTC
The glibc-gconv-utf-16 package gets generated from http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/glibc/glibc-locale.inc?h=kirkstone&id=58d4f669bd46805669daf87626350fe9359feca5

You need NOT add any layer. Just add the following line in the conf/local.conf and build your image.

IMAGE_INSTALL:append = " glibc-gconv-utf-16"


Regards,
Jagadeesh
Comment 5 Chen Feng 2022-05-26 12:07:08 UTC
Thanks Jagadeesh, Utf-16 has been enabled in my system
Comment 6 Jagadeesh Krishnanjanappa 2022-05-26 12:35:33 UTC
(In reply to comment #5)
> Thanks Jagadeesh, Utf-16 has been enabled in my system

Great. If the purpose is fulfilled you can close this bug.

Regards 
Jagadeesh
Comment 7 Richard Purdie 2022-05-26 14:38:31 UTC
User added package to image and resolved issue