File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
app/src/main/kotlin/org/fossify/filemanager/activities Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99- Fixed folders showing up incorrectly as files in copy/move dialog ([ #267 ] )
1010- Fixed error when saving files with unsupported characters ([ #250 ] )
1111- Fixed missing permission prompt on initial "Save as" launch ([ #85 ] )
12+ - Fixed printing text files containing a "#" ([ #104 ] )
1213
1314### Changed
1415- Search now ignores accents and diacritics ([ #95 ] )
@@ -82,6 +83,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8283[ #250 ] : https://github.com/FossifyOrg/File-Manager/issues/250
8384[ #85 ] : https://github.com/FossifyOrg/File-Manager/issues/85
8485[ #95 ] : https://github.com/FossifyOrg/File-Manager/issues/95
86+ [ #104 ] : https://github.com/FossifyOrg/File-Manager/issues/104
87+
8588
8689[ Unreleased ] : https://github.com/FossifyOrg/File-Manager/compare/1.2.3...HEAD
8790[ 1.2.3 ] : https://github.com/FossifyOrg/File-Manager/compare/1.2.2...1.2.3
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import android.net.Uri
77import android.os.Bundle
88import android.print.PrintAttributes
99import android.print.PrintManager
10+ import android.util.Base64
1011import android.view.inputmethod.EditorInfo
1112import android.webkit.WebResourceRequest
1213import android.webkit.WebView
@@ -229,7 +230,17 @@ class ReadTextActivity : SimpleActivity() {
229230 }
230231 }
231232
232- webView.loadData(binding.readTextView.text.toString(), " text/plain" , " UTF-8" )
233+ val text = binding.readTextView.text.toString()
234+ ensureBackgroundThread {
235+ try {
236+ val base64 = Base64 .encodeToString(text.toByteArray(), Base64 .DEFAULT )
237+ runOnUiThread {
238+ webView.loadData(base64, " text/plain" , " base64" )
239+ }
240+ } catch (e: Exception ) {
241+ showErrorToast(e)
242+ }
243+ }
233244 } catch (e: Exception ) {
234245 showErrorToast(e)
235246 }
You can’t perform that action at this time.
0 commit comments