Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception on binding WPF BitmapImage and german umlauts are used in file names (dotnet 9.0.0 / windows 11) #110838

Open
wd72 opened this issue Dec 19, 2024 · 1 comment
Labels
area-System.IO untriaged New issue has not been triaged by the area owner

Comments

@wd72
Copy link

wd72 commented Dec 19, 2024

Description

when using filenames on an UNC network share with german umlauts (ü,ö,ä) an Exception is thrown.

Reproduction Steps

use 2 files on unc network path:

\\ps-nas\Temp\products\TestU\testImage.jpg
\\ps-nas\Temp\products\TestÜ\testImage.jpg

WPF Code: (Windows Platform)

<Image Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Center" Width="300" Height="300">
    <Image.Source >
       <BitmapImage UriSource="{Binding FullFileName2}" CacheOption="OnLoad" />
    </Image.Source>
</Image>

ViewModel/Model Code:

    public string FullFileName2 { get { return @"\\ps-nas\Temp\products\TestU\testImage.jpg"; } }   // --> this works
    public string FullFileName2 { get { return @"\\ps-nas\Temp\products\TestÜ\testImage.jpg"; } }   // --> this does not work 

Expected behavior

german umlauts in filenames should work like in dotnet 8.

Actual behavior

Inner Exception 1:
DirectoryNotFoundException: Could not find a part of the path '\\ps-nas\temp\products\testü\testimage.jpg\Temp\products\TestÜ\testImage.jpg'.

the Image class does not use the provided path an appends something weird. --> the modified file name does not exist --> Exception.

wrong filename:
\\ps-nas\temp\products\testü\testimage.jpg\Temp\products\TestÜ\testImage.jpg
should be:
\\ps-nas\temp\products\testü\testimage.jpg

Regression?

this bug does not occur in dotnet 8

Known Workarounds

No response

Configuration

dotnet 9.0.0, Windows 11 24H2,

   <TargetFramework>net9.0-windows</TargetFramework>
   <Nullable>enable</Nullable>
   <UseWPF>true</UseWPF>
   <UseWindowsForms>true</UseWindowsForms>
   <PlatformTarget>x64</PlatformTarget>

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 19, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 19, 2024
@jeffhandley jeffhandley added area-System.IO and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Dec 19, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.IO untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants