Unconsistent iconv appendixes //TRANSLIT and //IGNORE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The appendixes of //TRANSLIT and //IGNORE can not work together on the same call.
It appears that it only works the first one to appear.
Example Code:
#######
#include <iconv.h>
#include <iostream>
#include <memory>
#include <cstring>
#include <string>
#include <utf8.h>
int main()
{
const std::string in = "\xc5\xbd";
iconv_t cd = iconv_open(
const char* inbuffer = in.c_str();
char outbuffer[
size_t srclen = in.length();
size_t targetlen = in.length()*2+1;
char* wrptr = outbuffer;
std::cout << outbuffer << std::endl;
}
#######
With "//TRANSLIT" first:
- "?"
WITH "//IGNORE" first:
- ""
I am expecting to work together so that if there is a translit for that character it translates it and if there is non it just ignores it instead of writing a "?".
This is at least the behaviour i get when compiling in other platforms (FreeBSD)
An while we are it we could add a translit for this specific case so that "\xc5\xbd" => "Z" ?
Thanks in Advance
- lsb_release -rd:
UBUNTU 18.04.01 LTS
- Package version:
libglib2.0-dev:
Installed: 2.56.2-