I have problem with FileOpenPicker. I use special characters e.g. ś ć ę and my file .txt has content: "śś ćć ę ó"
It is my code:
var picker = new Windows.Storage.Pickers.FileOpenPicker();
picker.ViewMode = Windows.Storage.Pickers.PickerViewMode.List;
picker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.Desktop;
picker.FileTypeFilter.Add(".txt");
Windows.Storage.StorageFile file = await picker.PickSingleFileAsync();
if (file != null)
{
using (var inputStream = await file.OpenReadAsync())
using (var classicStream = inputStream.AsStreamForRead())
using (var streamReader = new StreamReader(classicStream))
{
var something = streamReader.ReadToEnd();
}
}
And when I read my file I get something like this:
�� �� �
I tried change culture, encoding and nothing.
How is the problem with this class?
I really appreciate any help or guidance on this. Thanks!