mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
333 stars 171 forks source link

The surrogate pair (0xD83C, 0xD83C) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF). #713

Open krikz opened 3 years ago

krikz commented 3 years ago

When some data containts emoji, Telerik Reporting crashed on build report.

image

This exception appears when we switch libgdiplus from 4.2 version to 6.0.5 In dockerfile we build 6.0.5 with pango parameter:

RUN apt-get update \ 
    && apt-get install -y --allow-unauthenticated \ 
        libc6-dev \ 
        libgdiplus \ 
        libx11-dev \ 
        autoconf \
        libtool \
        automake \
        build-essential \
        gettext \
        libglib2.0-dev \
        libcairo2-dev \
        libtiff-dev \
        libexif-dev \
        libsdl-pango-dev
COPY src/Dpc/libs/libgdiplus-6.0.5 /tmp/libgdiplus
WORKDIR /tmp/libgdiplus
RUN chmod +x autogen.sh && ./autogen.sh --with-pango
RUN make && make install
RUN rm -rf /tmp/libgdiplus \
  && rm -rf /var/lib/apt/lists/* \
  && apt remove -y autoconf libtool automake build-essential \
  && cp /usr/local/lib/libgdiplus.so.0.0.0 /usr/lib/libgdiplus.so.0.0.0

If we comment 6.0.5 build Telerik Reporting works well but without pango reports look ugly.

We cannot determine steps to reproduce exactly for libgdiplus because we don't know which method telerik use and etc.

krikz commented 3 years ago

Looks like it touched #363

AdrenaLeen commented 2 years ago

The bug is reproduced when the report contains emoji