Printing Chinese

Hi all,

In my database I have chinese signs. How can I print (or see with print preview) them? At the moment i see only '?'...
I set the font to @PMingLiU and it's charset to Chines_Big5 (GB_3232 doesn't work either)

I managed to get FR in Chinese, but that isn't what I want...

Thnx in forward

Erik

Comments

  • edited 4:04AM
    maybe it's because FR can't print unicode characters.
  • edited 4:04AM
    Some other can? Someone knows how to with e.g. Rave, QReports...etc
  • edited 4:04AM
    We use FastReport in both Traditional and Simplified chinese and it works well. I think FastReport doesn't do any special process on string. You'd check the codepage of the data source and the system,are they same? For example,If you get Unicode string from data source and output them directly in fastreport, the string will process as ansi string and the string can not be seen.
  • edited 4:04AM
    Pipizhu wrote:
    We use FastReport in both Traditional and Simplified chinese and it works well. I think FastReport doesn't do any special process on string. You'd check the codepage of the data source and the system,are they same? For example,If you get Unicode string from data source and output them directly in fastreport, the string will process as ansi string and the string can not be seen.
    Thnx, some hope now, but
    Pipizhu wrote:
    If you get Unicode string from data source and output them directly in fastreport, the string will process as ansi string and the string can not be seen.

    I don't fully understand this...
    I have MSSQL where it's collation name is: Chinese_PRC_CS_AS_some-more
    and uses nvarchar. My delphi application uses ado to retrieve it (and does it well). I installed both Traditional and Simplified chinese on my system.

    In my delphi application:
    ADOConnection, ADOTable, FastReport, FastreportDataset (linked to ADOTable). I generated a report in the Fastrreport designer.

    But when I load this report, I only get '?' onstead of chinese signs.
    frReport1.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Untitled.frf');
      if frReport1.PrepareReport then
        frReport1.ShowPreparedReport;
    

    What am I doing wrong? Could you please send me a small example otherwise/

    Thanks in forward
  • edited 4:04AM
    Do all the chinese characters convert to '?' or only which get from database through the ADO?
    Debug your program and check the string which get from database,what you can see in Delphi?If you get Unicode string(I don't konw what it looks like in Delphi),try to use WideCharToMultiByte(SDK function) to convert them to MultiByte string.

    Hope this can help you.
  • edited 4:04AM
    All Chinese characters are converted to '?'.
    And when I use WideCharToMultiByte, my character is transformed to multiple (non-chinese)characters.

    Some code:
    WideCharToMultiByte(
          10002,  // traditional Chinese (Big5)
          0 {WC_SEPCHARS},
          pwidechar(StringGrid1.Cells[1,1]),
          length(pwidechar(StringGrid1.Cells[1,1])),
          pResultText,
          0,
          nil,
          nil);
    
    I am using a modified stringgrid which supports unicode (tnt components).
    No solution yet,...
    Do you program in Delphi?

  • edited 4:04AM
    It is strange! If you put a Memo into FastReport and type some chinese chars,it becomes '?' in the final report ? Or you use StringGrid only? Maybe the StringGrid deal the the string as Unicode but your string is Mutibyte. It isn't difficult to find out the codepage of your string. For example,a chinese character '人', in BIG5 is A448(hex), in GBK is C8CB, and unicode is 4EBA.
  • edited 4:04AM
    When I type a chinese sign directly into a memo field, it becomes '?' too...
    beside I can't use it from Delphi, Ms SQL, I can't use it within fastreport (by typing it directly in it)

    I'm using fastreport 2.5 unregistered (not going to pay as long as it doesn't work, omg I wanna pay ;) )

    How do you use them?
  • edited 4:04AM
    We use FastReport in CB4 and use BDE as our database engine. I think your problem is by reason of your system not FastReport.

    You can contact me directly. My E-mail is zhu_py@hotmail.com. You can write your mail in chinese. ;)
  • edited 4:04AM
    OMG, OMG

    THANX:
    It was the system! Not my keyboard!
    I had to change my locale into Chinees(China)... and i could keep my keyboard settings to dutch for example...

    Whoa, now I can have a nice weekend,
    Thanks again

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.