(quote) ( I am using OpenIndiana/Solaris Express 11 and g++ gives exactly the same error. However, solstudio produces a binary that creates the file but writes nothing to it (its length is zero). Apostolos ) Thanks many of your help in my first program, after I change Euro's unicode to \x20ac then it do print EUR in my screen but my outfile file (unicode_txt) still contain nothing(exist but length is zero)(which is out of expect, I assume it should print EUR as well as screen) plz help again, and thanks a lot in advance. Eric