Index: run/JvAppRegistryStorage.pas
===================================================================
--- run/JvAppRegistryStorage.pas	(revision 12353)
+++ run/JvAppRegistryStorage.pas	(working copy)
@@ -1,4 +1,4 @@
-{-----------------------------------------------------------------------------
+﻿{-----------------------------------------------------------------------------
 The contents of this file are subject to the Mozilla Public License
 Version 1.1 (the "License"); you may not use this file except in compliance
 with the License. You may obtain a copy of the License at
@@ -120,6 +120,8 @@
     procedure DoWriteString(const Path: string; const Value: string); override;
     function DoReadBinary(const Path: string; Buf: TJvBytes; BufSize: Integer): Integer; override;
     procedure DoWriteBinary(const Path: string; const Buf: TJvBytes; BufSize: Integer); override;
+    function DoReadWideString(const Path: string; const Default: Widestring): Widestring; override;
+    procedure DoWriteWideString(const Path: string; const Value: Widestring); override;
     class function GetStorageOptionsClass: TJvAppStorageOptionsClass; override;
   public
     constructor Create(AOwner: TComponent); override;
@@ -514,6 +516,33 @@
   RegWriteString(FRegHKEY, SubKey, ValueName, Value);
 end;
 
+function TJvAppRegistryStorage.DoReadWideString(const Path: string; const Default: Widestring): Widestring;
+var
+  SubKey: string;
+  ValueName: string;
+begin
+  SplitKeyPath(Path, SubKey, ValueName);
+  try
+    Result := RegReadWideStringDef(FRegHKEY, SubKey, ValueName, Default);
+  except
+    on E: EJclRegistryError do
+      if StorageOptions.DefaultIfReadConvertError then
+        Result := Default
+      else
+        raise;
+  end;
+end;
+
+procedure TJvAppRegistryStorage.DoWriteWideString(const Path: string; const Value: Widestring);
+var
+  SubKey: string;
+  ValueName: string;
+begin
+  SplitKeyPath(Path, SubKey, ValueName);
+  CreateKey(SubKey);
+  RegWriteWideString(FRegHKEY, SubKey, ValueName, Value);
+end;
+
 function TJvAppRegistryStorage.DoReadBinary(const Path: string; Buf: TJvBytes; BufSize: Integer): Integer;
 var
   SubKey: string;
Index: run/JvAppStorage.pas
===================================================================
--- run/JvAppStorage.pas	(revision 12353)
+++ run/JvAppStorage.pas	(working copy)
@@ -349,6 +349,14 @@
     function DoReadString(const Path: string; const Default: string): string; virtual; abstract;
     { Stores an string value. }
     procedure DoWriteString(const Path: string; const Value: string); virtual; abstract;
+
+    { Retrieves the specified string value. If the value is not found, the Default will be
+      returned. If the value is not a string (or can't be converted to a string an EConvertError
+      exception will be raised. }
+    function DoReadWideString(const Path: string; const Default: Widestring): Widestring; virtual;
+    { Stores an string value. }
+    procedure DoWriteWideString(const Path: string; const Value: Widestring); virtual;
+
     { Retrieves the specified value into a buffer. The result holds the number of bytes actually
       retrieved. }
     function DoReadBinary(const Path: string; Buf: TJvBytes; BufSize: Integer): Integer; virtual; abstract;
@@ -1745,11 +1753,27 @@
   Result := DoReadFloat(Path, Default);
 end;
 
+function TJvCustomAppStorage.DoReadWideString(const Path: string;
+  const Default: Widestring): Widestring;
+begin
+  {$IFDEF COMPILER12_UP}
+  Result := UTF8ToWideString(RawByteString(ReadString(Path, string(UTF8Encode(Default)))));
+  {$ELSE}
+  Result := UTF8Decode(ReadString(Path, UTF8Encode(Default)));
+  {$ENDIF COMPILER12_UP}
+end;
+
 procedure TJvCustomAppStorage.DoWriteDateTime(const Path: string; Value: TDateTime);
 begin
   DoWriteFloat(Path, Value);
 end;
 
+procedure TJvCustomAppStorage.DoWriteWideString(const Path: string;
+  const Value: Widestring);
+begin
+  DoWriteString(Path,string(UTF8Encode(Value)));
+end;
+
 procedure TJvCustomAppStorage.DoError(const msg: string);
 begin
   if Assigned(OnError) then
@@ -3220,17 +3244,13 @@
 function TJvCustomAppStorage.ReadWideString(const Path: string;
   const Default: WideString = ''): WideString;
 begin
-  {$IFDEF COMPILER12_UP}
-  Result := UTF8ToWideString(RawByteString(ReadString(Path, string(UTF8Encode(Default)))));
-  {$ELSE}
-  Result := UTF8Decode(ReadString(Path, UTF8Encode(Default)));
-  {$ENDIF COMPILER12_UP}
+  Result := DoReadWideString(Path,Default);
 end;
 
 procedure TJvCustomAppStorage.WriteWideString(const Path: string;
   const Value: WideString);
 begin
-  WriteString(Path, string(UTF8Encode(Value)));
+  DoWriteWideString(Path,Value);
 end;
 {$ENDIF COMPILER6_UP}
 
