When I use vtkTextActor to display Chinese, the Chinese string is converted to utf8 and then to string, but the conversion fails for odd numbers. So, how to display odd numbers of Chinese in c#?
vtkTextActor actor = new vtkTextActor();
actor.GetTextProperty().SetFontFamily(4);
actor.GetTextProperty().SetFontFile(@“C:\Windows\Fonts\simkai.ttf”);
actor.GetTextProperty().SetFontSize(20);
byte[] bytes = Encoding.UTF8.GetBytes("我");
string s = Encoding.Default.GetString(bytes);
actor.SetInput(s);
Unless there has been a recent change Activiz does not support conversion of c# strings to utf8 for proper handling of text in VTK. That means Activiz can only work with plain English text.
But our application is developed based on WPF. Should I use activiz for the 3D module? Or should 3D be done in c++? It seems that everyone uses the c++ version to make 3D. And there is no problem for c++ to display Chinese. I am a little troubled.
Nothing should be required on the Activiz side if you make sure your C# application is using UTF-8 characters only.
To do so, force the active codepage to UTF-8 by adding the following section in your app.manifest file:
By the way, who should I contact if I want to buy genuine activiz? And about invoice reimbursement. Failed to send the contact information on the official website all the time.