Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docu-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
docu-tools
Commits
90229329
Commit
90229329
authored
7 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
save the encoding in the note file
parent
9a5d0559
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm
+5
-3
5 additions, 3 deletions
perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm
with
5 additions
and
3 deletions
perl/Gnome-Tomboy/lib/Tomboy/Note/Simple.pm
+
5
−
3
View file @
90229329
...
@@ -522,7 +522,7 @@ sub save
...
@@ -522,7 +522,7 @@ sub save
my
$note
=
shift
;
my
$note
=
shift
;
my
$out_dir
=
shift
;
my
$out_dir
=
shift
;
my
$fnm_out
=
shift
;
my
$fnm_out
=
shift
;
my
$no_utf8
=
shift
;
my
$no_utf8
=
shift
;
# NOTE: this is experimental for the (broken) Android version of Tomboy (Tomdroid or so)
# refresh lines, if they are not up-to-date
# refresh lines, if they are not up-to-date
$note
->
update
()
unless
(
$note
->
{'
flg_lines
'});
$note
->
update
()
unless
(
$note
->
{'
flg_lines
'});
...
@@ -558,10 +558,12 @@ sub save
...
@@ -558,10 +558,12 @@ sub save
}
}
my
$out_mode
=
'
>:utf8
';
my
$out_mode
=
'
>:utf8
';
my
$xml_encoding
=
'
utf-8
';
if
(
$no_utf8
)
if
(
$no_utf8
)
{
{
print
"
save with no utf8!
\n
";
print
"
save with no utf8!
\n
";
$out_mode
=
'
>:encoding(iso-8859-7)
';
$out_mode
=
'
>:encoding(iso-8859-7)
';
$xml_encoding
=
'
iso-8859-7
';
# TODO: or whatever XML needs here..
}
}
unless
(
open
(
FO
,
$out_mode
,
$fnm_out
))
unless
(
open
(
FO
,
$out_mode
,
$fnm_out
))
...
@@ -573,8 +575,8 @@ sub save
...
@@ -573,8 +575,8 @@ sub save
print
"
writing note [
$fnm_out
]: [
$title
]
\n
";
# TODO: if verbose
print
"
writing note [
$fnm_out
]: [
$title
]
\n
";
# TODO: if verbose
print
FO
chr
(
65279
);
# write a BOM, Tomboy seems to like that
print
FO
chr
(
65279
);
# write a BOM, Tomboy seems to like that
print
FO
<<EOX;
print
FO
<<
"
EOX
"
;
<?xml version="1.0" encoding="
utf-8
"?>
<?xml version="1.0" encoding="
$xml_encoding
"?>
<note version="0.3" xmlns:link="http://beatniksoftware.com/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size" xmlns="http://beatniksoftware.com/tomboy">
<note version="0.3" xmlns:link="http://beatniksoftware.com/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size" xmlns="http://beatniksoftware.com/tomboy">
EOX
EOX
print
FO
'
<title>
'
.
Util::XML_Parser_Tree::
tlt_str
(
$title
)
.
"
</title>
\n
";
print
FO
'
<title>
'
.
Util::XML_Parser_Tree::
tlt_str
(
$title
)
.
"
</title>
\n
";
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment