trichview.com Forum Index trichview.com
TRichView support forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A strange BUG about Richview using unicode~~~~

 
Post new topic   Reply to topic    trichview.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
cakk



Joined: 17 Dec 2009
Posts: 14

PostPosted: Thu May 20, 2010 8:49 am    Post subject: A strange BUG about Richview using unicode~~~~ Reply with quote

I think I found a BUG about TRichview.

I'm using Delphi 6.0.
Create a new project, place a TRichView and a TRVStyle onto the Form1, and set it support unicode as the help says. Then I add some unicode text to it, some text works fine, but some words do not work , It looks like the Richview "eats" some word...

eg: I add the word "Ñ¡Ôñ" to richview, it only shows "Ôñ".


But, If I insert some other western letter before it, like "okÑ¡Ôñ", then it will be shown totally.


Here is my unit1.pas:
Code:

unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
  Forms,  Dialogs, StdCtrls, RVStyle, RVScroll, RichView;
type
  TForm1 = class(TForm)
    RichView1: TRichView;
    RVStyle1: TRVStyle;
    Button1: TButton;
    Edit1: TEdit;
    procedure Button1Click(Sender: TObject);
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
 Richview1.AddNLWTag(edit1.text,0,0,0);
 Richview1.Format;
end;
end.


And here is my unit1.dfm:
Code:

object Form1: TForm1
  Left = 307
  Top = 133
  Width = 348
  Height = 155
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object RichView1: TRichView
    Left = 8
    Top = 8
    Width = 313
    Height = 81
    TabOrder = 0
    DoInPaletteMode = rvpaCreateCopies
    RTFReadProperties.UnicodeMode = rvruOnlyUnicode
    RTFReadProperties.TextStyleMode = rvrsAddIfNeeded
    RTFReadProperties.ParaStyleMode = rvrsAddIfNeeded
    RTFReadProperties.UseCharsetForUnicode = True
    RTFReadProperties.CharsetForUnicode = GB2312_CHARSET
    RVFOptions = [rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoSaveBinary, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveDocProperties, rvfoLoadDocProperties]
    Style = RVStyle1
  end
  object Button1: TButton
    Left = 8
    Top = 96
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 1
    OnClick = Button1Click
  end
  object Edit1: TEdit
    Left = 88
    Top = 96
    Width = 121
    Height = 21
    TabOrder = 2
    Text = 'Ñ¡Ôñ'
  end
  object RVStyle1: TRVStyle
    TextStyles = <
      item
        StyleName = 'Normal text'
        Charset = GB2312_CHARSET
        FontName = 'Arial'
        Unicode = True
      end>
    ParaStyles = <
      item
        StyleName = 'Paragraph Style'
        Tabs = <>
      end>
    ListStyles = <>
    StyleTemplates = <>
    Left = 104
    Top = 96
  end
end
Back to top
View user's profile Send private message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 6607

PostPosted: Thu May 20, 2010 9:28 am    Post subject: Reply with quote

What version of TRichView?
Some old version of TRichView had a bug in displaying DBCS characters having bytes with code = 9.
Back to top
View user's profile Send private message Visit poster's website
cakk



Joined: 17 Dec 2009
Posts: 14

PostPosted: Thu May 20, 2010 10:59 am    Post subject: Reply with quote

TRichView 11.0.5
Back to top
View user's profile Send private message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 6607

PostPosted: Thu May 20, 2010 11:02 am    Post subject: Reply with quote

Please update to TRichView 12.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    trichview.com Forum Index -> Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group