Skip to content

Commit

Permalink
- Shift_JISの解析が失敗する不具合を修正(@994)
Browse files Browse the repository at this point in the history
- セキュリティ保全のため、なでしこエディタのブラウザ部品を廃止。
- 日本語環境以外では実行できない旨を表示(@401)
  • Loading branch information
kujirahand committed Mar 9, 2024
1 parent 8e78597 commit 8b18a65
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 107 deletions.
5 changes: 5 additions & 0 deletions History.txt
@@ -1,5 +1,10 @@
�y�Ȃł����X�V�����z��(@���l)���o�O�f���‚̃X���b�h�ԍ��ł��B(#���l)�͋�Trac�̔ԍ��B(r���l)�͋�SVN�̔ԍ��B

2024/03/09 version 1.589
- Shift_JIS�̉�͂����s����s����C��(@994)
- �Z�L�����e�B�ۑS�̂��߁A�Ȃł����G�f�B�^�̃u���E�U���i��p�~�B
- ���{��‹��ȊO�ł͎��s�ł��Ȃ��|��\��(@401)

2023/03/13 version 1.588
- �Ȃł����̃g�b�v�y�[�WURL�ύX�𔽉f(@985)
- �w�f�o�b�O�x�R�}���h�Ńf�o�b�O�E�B���h�E�Ƀ��C���v���O�������\������Ȃ������C��(@984)
Expand Down
Binary file modified hi_unit/dll_plugin_helper.dcu
Binary file not shown.
30 changes: 29 additions & 1 deletion hi_unit/hima_system.pas
Expand Up @@ -273,6 +273,10 @@ procedure AddStrVar(name, value: AnsiString; tag: Integer; kaisetu, yomigana: An



function GetUserDefaultLocaleName(
lpLocaleName : LPWSTR;
cchLocaleName : Integer) : Integer; stdcall; external 'Kernel32.dll';

var FHiSystem: THiSystem = nil;// private にすべし
var dnako_dll_handle: THandle = 0;

Expand Down Expand Up @@ -2923,9 +2927,33 @@ constructor HException.Create(msg: AnsiString);
Exception(Self).Create(string(msg));
end;


function GetUserLocale(): string;
var
p: array of WideChar;
begin
SetLength(p, 256);
GetUserDefaultLocaleName(@p[0], Length(p));
Result := trim(string(PWideChar(p)));
end;

var
loc, s: string;
i: Integer;
initialization
begin
HiSystem.CheckInitSystem; // 起動
// 日本語環境以外では動作しない旨を報告(@401)
loc := GetUserLocale();
if loc <> 'ja-JP' then
begin
s := 'This app only works in Japanese locale.'#13#10'Do you want to quit?';
i := MessageBox(0, PChar(s), 'Information', MB_YESNO);
if i = IDYES then begin
System.Exit;
end;
end;
// 起動
HiSystem.CheckInitSystem;
end;

finalization
Expand Down
2 changes: 1 addition & 1 deletion hi_unit/unit_string.pas
Expand Up @@ -20,7 +20,7 @@ interface

// SJIS Support
type TChars = set of AnsiChar;
const SJISLeadBytes: TChars = [#$81..#$9F,#$E0..#$EF];
const SJISLeadBytes: TChars = [#$81..#$9F,#$E0..#$FC];

//------------------------------------------------------------------------------
// PAnsiChar 関連
Expand Down
4 changes: 2 additions & 2 deletions nadesiko_version.pas
Expand Up @@ -4,8 +4,8 @@ interface

const
//todo 1:★★★なでしこバージョン
NADESIKO_VER = '1.588';
NADESIKO_DATE = '2022/03/13';
NADESIKO_VER = '1.589';
NADESIKO_DATE = '2024/03/09';
NADESIKO_GUID = '8EBAA659-590A-487A-8260-00F32660E014';

// REPORT : LocalAppData
Expand Down

0 comments on commit 8b18a65

Please sign in to comment.