Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SDK
Umbrello
Commits
dbb9a16a
Commit
dbb9a16a
authored
Mar 05, 2014
by
Ralf Habacker
Browse files
Add support for importing chinese (GB18030) encoded rational rose files.
CCBUG:331769
parent
0460ab0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
umbrello/import_rose.cpp
View file @
dbb9a16a
...
...
@@ -381,8 +381,20 @@ bool loadFromMDL(QIODevice& file)
while
(
!
(
line
=
stream
.
readLine
()).
isNull
())
{
linum
++
;
if
(
line
.
contains
(
QRegExp
(
"^
\\
s*
\\
(object Petal"
)))
{
while
(
!
(
line
=
stream
.
readLine
()).
isNull
()
&&
!
line
.
contains
(
')'
))
{
bool
finish
=
false
;
while
(
!
(
line
=
stream
.
readLine
()).
isNull
())
{
linum
++
;
// CHECK: do we need petal version info?
if
(
line
.
contains
(
')'
))
{
finish
=
true
;
line
=
line
.
replace
(
QLatin1String
(
")"
),
QLatin1String
(
""
));
}
QStringList
a
=
line
.
trimmed
().
split
(
QRegExp
(
"
\\
s+"
));
if
(
a
.
size
()
==
2
)
{
if
(
a
[
0
]
==
"charSet"
&&
a
[
1
]
==
"134"
)
stream
.
setCodec
(
"GB18030"
);
}
if
(
finish
)
break
;
}
if
(
line
.
isNull
())
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment