codecvt Questions

5

Solved

A bit of foreground: my task required converting UTF-8 XML file to UTF-16 (with proper header, of course). And so I searched about usual ways of converting UTF-8 to UTF-16, and found out that one s...
Salzburg asked 22/3, 2017 at 8:32

1

Solved

I've been implementing a codecvt for handling indentiation of output streams. It can be used like this and works fine: std::cout << indenter::push << "im indentet" << in...
Teenyweeny asked 23/11, 2020 at 23:3

2

Solved

Extending from this questions about locales And described in this question: What I really wanted to do was install a codecvt facet into the locale that understands UTF-16 files. I could write my o...
Terza asked 17/12, 2009 at 16:51

4

Solved

This code compiles with Visual C++ 11 and runs as expected on Windows 7 but fails to compile using either MinGW 4.7.0 on Windows 7 or gcc 4.8.0 on Linux. Compiling with -std=c++11 flag #include &l...
Relieve asked 25/3, 2013 at 12:36

1

I'm getting an STL-related link error, using Microsoft Visual Studio Community 2015 RC (Version 14.0.22823.1 D14REL) I'm linking a C++ DLL and successfully using many functions from the STL, but i...
Soloist asked 10/6, 2015 at 19:11

1

I'm working with code that expects utf8-encoded std::string variables. I want to be able to handle a user-supplied file that potentially has utf-16 encoding (I don't know the encoding at design tim...
Ashla asked 12/3, 2015 at 14:28

1

Solved

I have overloaded do_in method of std::codecvt: #include <iostream> #include <locale> #include <string> class codecvt_to_upper : public std::codecvt<char, char, std::mbstate_...
Wilmerwilmette asked 27/3, 2014 at 13:21

2

Solved

I have been exploring C++11's new Unicode functionality, and while other C++11 encoding questions have been very helpful, I have a question about the following code snippet from cppreference. The c...
Undulate asked 18/3, 2013 at 9:10

3

Solved

In C++, I want to use Unicode to do things. So after falling down the rabbit hole of Unicode, I've managed to end up in a train wreck of confusion, headaches and locales. But in Boost I've had the...
Outdistance asked 22/10, 2011 at 12:49

2

Solved

How do I write a std::codecvt facet? I'd like to write ones that go from UTF-16 to UTF-8, which go from UTF-16 to the systems current code page (windows, so CP_ACP), and to the system's OEM codepag...
Sitology asked 4/6, 2010 at 3:48
1

© 2022 - 2024 — McMap. All rights reserved.