Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
conversion of char* to UniChar* ??
Hi all
I am developing an application using QT programming. I have to use system API for this i have to pass UniChar string to API but i have Char * string. How i can convert this char * to UniChar * . How i can convert the QString type string to UniChar * string??.
Thanks and Regards
RE: conversion of char* to UniChar* ??
Try
QString::ucs2() or
QString::utf8() depending on which Unicode encoding you expect to find in the
UniChar string.
Hi
I am working on QT for Mac. I have to create a file using FSCreateFileUnicode() for this API i have to pass UniChar * name . But i have name which is of QString type. How should i have to convert this QString to UniChar*.
Thanks and Regards
I could be wrong, but I believe the MAC native encoding is utf8. Try using the QString::utf8() and QString::fromUtf8() functions.
I have enough sense to know that "common sense" is an oxymoron.