인코딩 변경
This commit is contained in:
parent
36f274e844
commit
b25f006110
1 changed files with 16 additions and 5 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:dart_framework/charset/euc_kr.dart';
|
||||
import 'package:dart_framework/utils/system_util.dart';
|
||||
|
|
@ -52,11 +53,21 @@ class Application {
|
|||
]).then((ProcessResult result) => jsonStr = result.stdout);
|
||||
jenkinsMap = getMapFromJson(jsonStr)!;
|
||||
} else if (Platform.isWindows) {
|
||||
await Process.run('cmd', [
|
||||
'/C',
|
||||
'${Directory.current.path}/assets/script/batch/jenkins_env_params.bat'
|
||||
]).then((ProcessResult result) => jsonStr = result.stdout);
|
||||
jsonStr = jsonStr.replaceAll('\\', '/');
|
||||
List<int>? stdout;
|
||||
List<int>? stderr;
|
||||
await Process.run(
|
||||
'cmd',
|
||||
[
|
||||
'/C',
|
||||
'${Directory.current.path}/assets/script/batch/jenkins_env_params.bat'
|
||||
],
|
||||
stdoutEncoding: Encoding.getByName('euc-kr'),
|
||||
stderrEncoding: Encoding.getByName('euc-kr'))
|
||||
.then((ProcessResult result) {
|
||||
stdout = result.stdout;
|
||||
stderr = result.stderr;
|
||||
});
|
||||
jsonStr = eucKr.decode(stdout!).replaceAll('\\', '/');
|
||||
jenkinsMap = getMapFromJson(jsonStr);
|
||||
} else {
|
||||
enable = false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue