System call support for unicodes

Hi Solaris guru,
One of my application (C,Solaris2.7) is required to work in multiple languages. This application makes use of system & C library calls. Is it possible for a japanese user to create file names in japanese? if so how will I able to use these names (let's assume unicodes) with standard system calls and library routines which consider file names has char *?
I have noticed that Solaris provides wchar_t and (wchar.h) wide string library calls (Ex, wprintf, wscanf, wcstrcmp etc). are there any similar w-version of system calls?
I greatly appreciate your help.
Cheers
Ramesh

I don't know of a Solaris system call to copy files. I do know there is no such C or C++ standard library function.
It's easy enough to write a file copy routine, however.
C++ 4.2 is obsolete and no longer supported. It predates the 1998 C++ standard by a few years.
But using old-style C++, here is a copy-file routine:
#include <fstream.h>
int copyfiles(const char* i, const char* o)
ifstream in(i, ios::in|ios::binary);
ofstream out(o, ios::out|ios::binary);
out << in.rdbuf();
return !(!in && !out);
You pass it the names of the input and output files. It opens the files in binary mode, copies input to output if possible, and reports status by returning 1 for success and 0 for failure.
Using standard C++, the routine looks like this:
#include <fstream>
bool copyfiles(const char* i, const char* o)
std::ifstream in(i, std::ios::binary);
std::ofstream out(o, std::ios::binary);
out << in.rdbuf();
return !(!in && !out);

Similar Messages

  • Call upon even better support for Unicode

    Hello
    Following some messages I have posted regarding problems I encountered while developing a non-English web application, I would like to call upon an even better support for Unicode. Before I describe my call, I want to say that I consider Berkeley DBXML a superb product. Superb. It lets us develop very clean and maintainable applications. Maintainability is, in my view, the keyword in good software development practices.
    In this message I would like to remind you that the US-ASCII 8-bit set of characters only represents 0.4% of all characters in the world. It is also true to say that most of our software comes from efforts of American developers, for which I am of course very grateful.
    But problems with non US-ASCII characters are very very time consuming to solve. To start with, our operating systems need to be configured especially for unicode, our servers too, our development tools too, our source code too and, finally, our data too. That's a lot of configuring, isn't it? Believe me, as a Flemish french-speaking, danish-speaking developer who develops currently a new application in Portuguese, I know what I am talking about.
    Have you ever tried to write a Java class called Ação.java, that loads an xml instance called Ação.xml that contains something like <?xml version="1.0" charset="utf-8"?></ação variável="descrição"/>? It takes at least the double of time to have all this work right in a web application on a Linux server than it would take to write a Acao.java that loads Acao.xml containing <?xml version="1.0" charset="us-ascii"?></acao variavel="descricao"/> (which is clearly something we do not want in Portugal).
    I have experienced a problem while using the dbxml shell to load documents that have utf-8 encoded names. See difficulties retrieving documents with non ascii characters in name The work around is not to use the dbxml shell, with which I am of course not very happy.
    So, while trying not to be arrogant and while trying to express my very very great appreciation for this great product, I call upon even better support for Unicode. After all, when the rest of us, that use another 65279 characters in our software, will be able to use this great product without problems, will it not contribute to the success of Berkeley DBXML?
    Thank you
    Koen
    Edited by: koenheene on 29/Out/2009 3:09

    Hello John and thank you for replying,
    You are completely correct that it is a shell problem. I investigated and found solutions for running dbxml in a Linux shell. On Windows, as one could expect, no solution so far.
    Here is an overview of my investigation, which I hope will be useful for other developers which also presist writing code and xml in their language.
    difficulties retrieving documents with non ascii characters in name
    I was wondering though if it would not be possible to write the dbxml shell in such a way that it becomes independent from the encoding of the shell. Surely their must be, not? Rewrite dbxml in Java? Any candidates :-) ?
    Thanks again for the very good work,
    Koen

  • When I try to open Safari I get error message: Safari - Alert    Suspicious Activity Might Have been Detected.  Major Security Issue  To fix it please call Support for Apple  1 800-680-4131 (Toll Free) immediately!

    Started to get pop ups when tried to open a video on face book. Directed for a download of MPlayerX-2.dmg and did attempt to install but never got video up/.
    Error message also states to
    To fix it please call Support for Apple +1 800-680-4131 (Toll Free) immediately! and also gives out a web site of http://mac-online-support.com

    You may have installed the "Downlite" or "VSearch" ad-injection malware. Follow the instructions on this Apple Support page to remove it.
    Back up all data before making any changes.
    Besides the files listed in the support article, you may also need to remove this item in the same way:
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those. If Safari crashes on launch, skip that step and come back to it after you've done everything else.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, then you may have one of the other kinds of adware covered by the support article. Follow the rest of the instructions in the article.
    The problem may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This malware is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates
    if it's not already checked.

  • On my ipad mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server.

    On my iPad Mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server. 
    My husband and I share an email address and if he misses a day checking email on his notebook, he doesn't receive the items that I have sent to Trash on my iPad Mini.
    Appreciate suggestions.
    [The curious thing is, if I "move" the deleted emails from Trash on my iPad Mini into the Inbox, I can go to my notebook, open my online email and they are back in my ATT/Yahoo Inbox.]

    Is your Yahoo account set up as POP3 or IMAP?

  • Is there any system level support for RAW files from an Olympus XZ-10 camera.  I use Lion and iPhoto version 9.4.2

    Is there any system level support for RAW files from an Olympus XZ-10 camera.  I use Lion and iPhoto version 9.4.2

    If there is I can not find it - Google provides a list of possible methods form Adobe and others
    LN

  • Does anyone have a phone number to actually call support for itunes store

    does anyone have a phone number to actually call support for itunes store

    You're probably right - however I only stumbled in here yesterday through Google, I'd not visited the site before and really only registered to say "me too" and look for an answer.
    I've never been a huge Apple fan, but when I finally moved to an iPod from Creative and Sony players last year, I was quite impressed. So much so that I also upgraded to an iPhone this year. Never had previous experience of trouble with iTunes and believed Apple's hype about reliability - lesson learnt!
    I've found no answers here or from Apple themselves so I probably won't be back - and the iPad and Macbook will come out of my wish list!

  • No system restore support for Windows 8.1?

    Last week I purchased a Satellite E45t-A4300.  It came with Windows 8.  Soon after booting it up I received a message from Microsoft saying that I could update to Windows 8.1 for free.  So, I did.   The next day I called Toshiba's customer support in order to learn how to make back-up/recovery media.  I was told that since I had updated to Windows 8.1, Toshiba would take no responsibility, since the Recovery Media Center software supplied with the computer is meant for Windows 8.0.  Is this indeed the case?   What can I do?  Thanks for any replies.

    Your upgrade to Windows 8.1 from the Windows Store did not disturb the recovery partition. Consequently, refreshing or resetting your PC will restore Windows 8. Recovery media created from that partition also has the factory-new image. After restoring from either, you would then need to upgrade to Windows 8.1 again.
    That works out fine for me, since I use restore to out-of-box only to test the hardware. I rely on a current (last night's) backup image to restore the hard drive.
    If you don't want to obtain a third-party imaging application, Windows 7 full-disk imaging is still available in Windows 8.1. Paul Thurrott describes it here.
       Windows 8.1 Tip: Use System Image Backup
    For data files, File History is very good.
       Set up a drive for File History
       Restore files or folders using File History
    -Jerry

  • System call "copy" for C++ compiler 4.2?

    System call "rename" is very close to what I am looking for but "copy" is better because I need to keep the original file. Where I can find it, or any equivalent?
    MM
    [email protected]

    I don't know of a Solaris system call to copy files. I do know there is no such C or C++ standard library function.
    It's easy enough to write a file copy routine, however.
    C++ 4.2 is obsolete and no longer supported. It predates the 1998 C++ standard by a few years.
    But using old-style C++, here is a copy-file routine:
    #include <fstream.h>
    int copyfiles(const char* i, const char* o)
    ifstream in(i, ios::in|ios::binary);
    ofstream out(o, ios::out|ios::binary);
    out << in.rdbuf();
    return !(!in && !out);
    You pass it the names of the input and output files. It opens the files in binary mode, copies input to output if possible, and reports status by returning 1 for success and 0 for failure.
    Using standard C++, the routine looks like this:
    #include <fstream>
    bool copyfiles(const char* i, const char* o)
    std::ifstream in(i, std::ios::binary);
    std::ofstream out(o, std::ios::binary);
    out << in.rdbuf();
    return !(!in && !out);

  • Multiple Holiday Greetings in System Call Handler for UC 7.0

    Hi All,
    Is there any way to play individual Holiday Greetings in a System Call Handler in UC 7.0, i.e. XMas Day Greeting gets played on XMas Day and New Year's Greeting gets played on New Year
    As far as Cisco's Doc's I havent seen anywhere this being specified.
    Any helpful would be greatly appreciated.
    Regards
    Sam Wilson

    Hi David,
    Thanks for your prompt reply.
    So does it mean I have to record the greetings before every holiday and set it, or there is a way, to fall it over to a different Call Handler each with unique Holiday Greetings.
    Regards
    Sam Wilson

  • Enterprise System 5 support for Windows 2003 server

    Hi,
    Can you tell me if it is possible to run Sun Java Enterprise System 5 on a windows server and get the portal server to work?
    Weare currently using JBoss ... and not very keen on it as a portal server.
    I tried installing ES5 but was unable to get the portal server to play, then i read something about no support for windows 2003 in ES5.
    Can someone confirm if this is true, unfortunately I am tied into using a windows server for lots of reasons. Is the download for ES4 still available? I believe Portal 6.0 instead of 7 is still ok for windows Server 2003 ?
    If Portal 7.0 will play with windows, is there a guide somewhere that you can point me to as I am totally new to portals and could use a bit of an idiots guide.
    Any info welcome !!
    Cheers

    The support for Sun Java System Portal Server on Windows in Java Enterprise System 5 is limited to evaluation and development only. The Windows distribution for Portal Server (PS 7.1 Update 2) is provided as a pre-configured install. To install it, you unzip the file, and run a small setup script to change the hostname information. The pre-configured installation is setup with a fixed install location, ports, etc. so it is not really suitable for a deployment for that reason. Once installed, all of the functionality is there otherwise except the ability to patch the system.
    Note: I just tried going through the download links, and there is something broken in the Sun download center. I've sent an internal notification about this.

  • Disappointing lack of support for Unicode

    I was very disappointed to find that Pages 2 still cannot properly support Unicode. TextEdit does a vastly better job of supporting Unicode. I can paste Unicode text into Pages 2 that I have already edited in TextEdit, but it cannot be properly typed in or edited in Pages 2 with the full range of Unicode. Some Unicode is okay, but not all of it. Absolutely can't be done! When are they going to get it right?

    does Pages 2 do
    the double-overstrike formatting that we discussed in
    re Navajo some times back? Pages 1, unlike TextEdit,
    wouldn't let you click an ogonek or acute accent onto
    a vowel with the other. (I was looking to make Navajo
    a- or o-with-acute-accent-and-ogonek.)
    I think so. I believe even Pages 1 was able to do that right after some OS update, but I can't remember now. Anyway I just tested Pages 2 (10.3.9) and made the a and o with the two accents using OptionShiftm for combining ogonek and OptionShifte for combining acute (US Extended Layout). Lucida Grande Font.

  • UDS support for Unicode

    Hi,
    I have a problem with retrieving Japanese characters from the Oracle Database.
    Here is the scenario.
    Environment
    I have an Oracle 8i database that has been configured for AL24UTFFSS character code set in the NLS_DATABASE_PARAMETERS. From UDS, some Japanese characters were inserted into tables of this database with �AMERICAN_AMERICA.JA16SJIS� as NLS_LANG environment variable on the machine that runs the DBSession.
    Positive result from [b]iSQL *Plus
    iSQL*Plus supports Unicode. And the results are as expected. I have a opened a session with NLS_LANG for the session being set to �AMERICAN_AMERICA. AL24UTFFSS�. I was able to retrieve the Japanese characters by a SELECT statement with no problem.
    Negative Results from UDS 5.0.15
    Understanding that starting with release 5.0 SP1, UDS offers full support of the Unicode codeset, I was expecting similar results from UDS client application. The DBSession was established with the NLS_LANG set to �AMERICAN_AMERICA. AL24UTFFSS�. (same as for iSQL*Plus). When I executed a small test application on a client PC with FORTE_LOCALE being set for �ja_jp.UTF8�, I only could see junk characters on the screen. I have tried even by setting �ja_jp.sjs� as FORTE_LOCALE. I am getting junk characters in all occasions unless I set �AMERICAN_AMERICA.JA16SJIS� as NLS_LANG environment variable on the machine that runs the DBSession, which I don�t want as I want Korean, Chinese and additional characters sets also handled properly leveraging the fact that UDS now Forte supports Unicode.
    We have multiple advantages if we can set a single NLS_LANG to support multiple languages. Apparently, there seems to be no problem with Oracle as I could retireve the charactes from iSQL*Plus.
    I appreciate your help in this.
    Thank you
    GS

    Hi,
    In the above description I told that we are using UDS 5.0.15.
    Forte says that starting with release 5.0 SP1, the UDS offers full support of the Unicode codeset .
    http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=finfodoc%2F67723
    Does it mean that I have the version prior the version that supports Unicode?
    Regards
    GS

  • Database support for unicode

    Hello, I am in the process uf upgrading database installation scripts so they will support Unicode. I just want to clarify that by changing the Character set to say for example AL32UTF8 and the National Character Set to UTF8 the database will then be able to support Unicode. Do I need to also change all the VARCHAR2 and CHAR2 data types to NVARCHAR2 and CHAR2? When changing the character sets do the database then default to bytes instead of characters for multibyte character storage? Thank you.
    -- David

    You would not want a situation where some clients have a database character set of AL32UTF8 and are storing the data in CHAR/ VARCHAR2 columns and some clients have a non-Unicode database character set, a Unicode national character set, and store their Unicode data in NCHAR/ NVARCHAR2 columns (I'm assuming from the context that you are some sort of application vendor here so that different clients are trying to run the same application). That would massively increase the complexity of your application code and make testing & supporting the application substantially more difficult.
    If at all possible, it is preferable to change the database character set to Unicode for existing databases. This may involve exporting & importing some or all of the data or it may be possible online (there is a chapter in the Globalization Support document that covers character set migration and the various options you have).
    Storing data in NCHAR/ NVARCHAR2 columns should generally be a last resort (unless you really know what you are doing and want to leverage different Unicode encodings). You are likely to cause yourself all sorts of headaches trying to support national character set data types.
    Justin

  • Support for Unicode Strings

    Hi
    I was wondering if Berkeley DB supports storing and retrieving Unicode Strings. (I guess it should be supporting it but just wanted to confirm) and if yes what encoding does it use.
    Thanks,
    KarthikR

    Again, I'm not an authority, but I believe so, yes. From what I've read, BDB only knows about "data," which basically means a sequence of bytes. Thus, in C you could define a struct that contains your specific schema for keys and values, but you'd just write the raw data behind the struct to BDB, which doesn't care or know about your particular format.
    So you'd probably have to convert your unicode string to a byte sequence in some way or another. UTF-8 is the first option that comes to mind, but maybe UTF-16 or UTF-32 (if you really don't care about space) would be simpler to implement.
    Hope this helps,
    Daniel

  • Operating system not supported for installing ALM trail version on a windows 7

    My mahine has windows 7 64bit operating system and 8GB Ram but when I am trying to install intall ALM 12.2 it says This machines' operating system is not a supported and recommended ALM (12.20) server.

    You need to update your version of XP to SP2. You can do this for free at microsofts website or by using windows update.

Maybe you are looking for

  • STO process gone  bad

    Dear Gurus, Greetings. We have configured the STO process between Plant 4000 to Plant 4400 and everything was working good. The end user wanted a little more facility, so we went for one step procedure. SPRO - Materials Management - Purchasing - Purc

  • Change in table maintenance generator

    Hi All, I have created one table. While creating data through table maintenace, if for values of nonkey fields are same then it should give some error? How to achieve this functionality? Regards, Jeetu

  • HTTP ReceiverCustomizer to edit XML

    Hi I am trying to edit the XML message coming into my HTTP adapter but I am getting a java.lang.StringIndexOutOfBoundsException error when trying to delete text. If I run the java on the same XML file outside of the adapter, it works fine, it just do

  • Partitioning an external drive: HFS and FAT32

    so i've just partitioned my external USB drive into an 8GB HFS partition (to hold an copy of my leopard installation DVD) and a 300GB FAT32 partition, to pull gobs of files off of my PC at home. is this an ideal setup? i was thinking of doing HFS/NTF

  • PB 2.1.0.1032: Bridge SMS, trouble with Charset (russian)

    UPD: Create issue https://www.blackberry.com/jira/browse/TABLET-687