Hi,<div><br></div><div>Sean, at my system vtkTextActor::SetInput() also expects ISO-8859-1. I'm using Qt and I have to call QString::toLatin1() to be able to use accents in VTK.</div><div><br></div><div>Marcus, let me know if you has any questions about the patch which tries to solve <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(34, 34, 34); ">the drop shadow rendering problem</span>.</div>
<div><br></div><div>Thanks for your attention,</div><div><br></div><div>Roger</div><div> </div><div><br><div class="gmail_quote">On Tue, Dec 7, 2010 at 10:35 PM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Tue, 7 Dec 2010 15:27:03 -0500, Marcus D. Hanwell said:<br>
<br>
>>> Just to clarify, what encoding should be given to vtkTextActor::SetInput<br>
>>> ()? Last I tried, it seemed to expect ISO-8859-1. Certainly a step up<br>
>>> from ASCII! Is the long term plan for it to accept UTF8?<br>
>><br>
>> I think it is best if VTK strings use the system default encoding, rather<br>
>> than utf-8. For unicode there is always vtkUnicodeString. More classes<br>
>> should be adapted to take vtkUnicodeString as input (but only, of course,<br>
>> if they are internally capable of using/rendering unicode).<br>
>><br>
>> But I'm flexible. Really, I'm just pushing for VTK's string handling to be<br>
>> more similar to Python's. ;)<br>
>><br>
>I am not too concerned about aligning with Python's string handling,<br>
>but agree with David - I think we should be adjusting existing classes<br>
>to deal with and take vtkUnicodeString, which can take UTF8 strings<br>
>for construction.<br>
<br>
</div>Agreed.<br>
<div class="im"><br>
>It would probably be simplest to interpret all const<br>
>char* and vtkStdString as UTF8 when it came to rendering, as minimal<br>
>code/API changes would be required.<br>
<br>
</div>I agree here too, but such a change would appear to break binary<br>
compatibility. Today's vtkTextActor::SetInput() expects ISO-8859-1 (at<br>
least on my system), if we change it to expect UTF8 we break existing<br>
clients of VTK.<br>
<br>
In any case, API that take char* should document which encoding they<br>
expect. Consider the tiny attached patch.<br>
<div class="im"><br>
>If you look at vtkContext2D and friends, where I have been prototyping<br>
>the UTF8 string handling and Unicode rendering, I have used<br>
>vtkUnicodeString as the function argument.<br>
<br>
</div>Sounds great.<br>
<div class="im"><br>
>I certainly welcome people's thoughts on this. Working through the<br>
>relevant classes, and adding vtkUnicodeString API to them where and<br>
>when they can really render Unicode seems like a reasonable approach<br>
>to me.<br>
<br>
</div>vtkTextActor appears to be in need of vtkUnicodeString support...<br>
<div><div></div><div class="h5"><br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer Montréal, Québec, Canada<br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>