msg7086 / x265-Yuuki-Asuna

A fork of x265. A modded version.
GNU General Public License v2.0
174 stars 35 forks source link

Non ASCII text encoding not working in avs reader #14

Closed stax76 closed 3 years ago

stax76 commented 3 years ago

@DJATOM @msg7086 @Patman86

ANSI is currently not working in the avs reader, on systems with CP 1252 (Western European) German Umlauts ü ö ä do not work, this is working in the lavf reader and also in the x264 reader.

But UTF-8 should be enforced by using a UTF-8 manifest, this is a new Windows 10 1903 feature and is already actively and successfully used by x264, mpv.net and staxrip, but these three applications do not only support enforced UTF-8, they also support long path which is also a very important feature.

Here is the commit that includes all this:

https://code.videolan.org/videolan/x264/-/merge_requests/37/diffs?commit_id=7ab4c928ef4511ea5753a36a57c3506d9fd5086b

DJATOM commented 3 years ago

Looks like handcrafted manifest works. For now I just manually added

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity type="win32" name="MCW.x265" version="3.4.0.1"/>
    <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings>
            <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
            <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
        </windowsSettings>
    </application>
</assembly>

into x265res.manifest and included it (1 RT_MANIFEST "x265res.manifest") into x265.rc. That was enough.

ghost commented 3 years ago

@DJATOM I've tested your latest x265-x64-v3.4+62-aMod-gcc10.2.1+opt.

Many thanks !

ghost commented 3 years ago

@Patman86 could you implement this as well in your build ? (please read manifest above, it worked)

Patman86 commented 3 years ago

I haven't had time to compile my build yet, but I also did it via a manifest, similar to @DJATOM.

msg7086 commented 3 years ago

I'm getting CVTRES : fatal error CVT1100. Manually disabling /manifest:embed in MSVC solves the issue, but how do you solve it automatically from CMake side?

Patman86 commented 3 years ago

Right now I'm using a separate script to compile with Visual Studio. I'll take a look and give you feedback (I've an idea)

Patman86 commented 3 years ago

Add

    if(MSVC)
        set(CMAKE_EXE_LINKER_FLAGS "/MANIFEST:NO")
    endif(MSVC)

to the part of the

# Main CLI application

msg7086 commented 3 years ago

Cool!