https://bugzilla.novell.com/show_bug.cgi?id=646192

https://bugzilla.novell.com/show_bug.cgi?id=646192#c0


           Summary: Passing strings with accents to
                    Mono.Cairo.Context.ShowText() causes all subsequent
                    drawing on the context to not render.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Mono.Cairo
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.10
(KHTML, like Gecko) Chrome/7.0.544.0 Safari/534.10

The documentation says that the method requires a utf8 string and it's declared

       [DllImport(cairo)]
       internal static extern void cairo_show_text(IntPtr cr, string utf8);

But as I understand it strings in .Net are always supposed to be utf16 so there
needs to be a conversion between what is passed in .Net and what is then passed
to Cairo using Encoding.UTF8.

The symptom is that if strings with accents or guillemets are passed then no
subsequent drawing operations render anything to the context.

The workaround is to strip accents and replace characters that it doesn't like
before passing them to ShowText.

Tested on Windows with Mono 2.6.4 and 2.8.

Probably the same thing affects the other methods that 

(On Ubuntu with 2.4 and 2.6 there is no problem.)

Reproducible: Always

Steps to Reproduce:
1. draw something on the context, it renders.
2. context.ShowText("é"), it doesn't render.
3. draw anything else, it doesn't render.


Expected Results:  
As - on Linux everything is rendered, accents and all.

I am running the binaries built on Ubuntu on Windows XP with .Net 3.5 SP1 with
the rest of the Mono and Gtk# dlls from the Mono 2.8 Windows distribution.
Everything works find except this one aspect.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to