Skip to content

Commit

Permalink
+ chg: UTF-8 encoding based resource files (*.rc), UTF-8-Sig. based s…
Browse files Browse the repository at this point in the history
…ource code files (.c .h .cpp)
  • Loading branch information
RaiKoHoff committed Nov 15, 2018
1 parent e5fc9d9 commit 637bd98
Show file tree
Hide file tree
Showing 357 changed files with 305 additions and 169 deletions.
2 changes: 1 addition & 1 deletion Version_PAPPS.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
setlocal
set _VERPATCH_=Dev_Test_1
set _VERPATCH_=Dev_Test_2
echo "%_VERPATCH_%" > .\np3portableapp\_buildname.txt
Version -VerPatch "%_VERPATCH_%"
endlocal
Binary file modified Versions/VersionEx.h.tpl
Binary file not shown.
2 changes: 1 addition & 1 deletion Versions/build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1436
1437
Binary file modified ced/ced.cpp
Binary file not shown.
4 changes: 4 additions & 0 deletions ced/ced.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>ced;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -120,6 +121,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>ced;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -139,6 +141,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>ced;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -160,6 +163,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>ced;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
20 changes: 10 additions & 10 deletions ced/ced/compact_enc_det/compact_enc_det.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -88,19 +88,19 @@ using std::string;

// Norbert Runge has noted these words in CP1252 that are mistakenly identified
// as UTF-8 because of the last pair of characters:
// NESTLÉ® 0xC9 0xAE U+00C9 U+00AE C9AE = U+026E;SMALL LEZH
// drauß\u2019 0xDF 0x92 U+00DF U+2019 DF92 = U+07D2;NKO LETTER N
// Mutterschoß\u201c 0xDF 0x93 U+00DF U+201C DF93 = U+07D3;NKO LETTER BA
// Schoß\u201c 0xDF 0x93 U+00DF U+201C
// weiß\u201c 0xDF 0x93 U+00DF U+00AB
// Schnellfuß\u201c 0xDF 0x93 U+00DF U+201C
// süß« 0xDF 0xAB U+00DF U+00AB DFAB = U+07EB;NKO HIGH TONE
// NESTLÉ® 0xC9 0xAE U+00C9 U+00AE C9AE = U+026E;SMALL LEZH
// drauß\u2019 0xDF 0x92 U+00DF U+2019 DF92 = U+07D2;NKO LETTER N
// Mutterschoß\u201c 0xDF 0x93 U+00DF U+201C DF93 = U+07D3;NKO LETTER BA
// Schoß\u201c 0xDF 0x93 U+00DF U+201C
// weiß\u201c 0xDF 0x93 U+00DF U+00AB
// Schnellfuß\u201c 0xDF 0x93 U+00DF U+201C
// süß« 0xDF 0xAB U+00DF U+00AB DFAB = U+07EB;NKO HIGH TONE
// These four byte combinations now explicitly boost Latin1/CP1252.

// And for reference, here are a couple of Portuguese spellings
// that may be mistaken as double-byte encodings.
// informações 0xE7 0xF5
// traição 0xE7 0xE3
// informações 0xE7 0xF5
// traição 0xE7 0xE3


static const char* kVersion = "2.2";
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/compact_enc_det.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/compact_enc_det_fuzz_test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/compact_enc_det_generated_tables.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/compact_enc_det_hint_code.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/compact_enc_det_hint_code.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/compact_enc_det_unittest.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/compact_enc_det/detail_head_string.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/basictypes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/case_insensitive_hash.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/commandlineflags.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/encodings/encodings.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/encodings/encodings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/encodings/encodings.pb.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/encodings/encodings_unittest.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/languages/languages.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/languages/languages.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/languages/languages.pb.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/logging.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/port.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/string_util.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion ced/ced/util/varsetter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Google Inc.
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Binary file modified ced/targetver.h
Binary file not shown.
2 changes: 1 addition & 1 deletion crypto/crypto.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


/**
*
* Distributed under the terms of the GNU General Public License,
Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@


#ifndef __CRYPTO_H__
#define __CRYPTO_H__

Expand Down
2 changes: 1 addition & 1 deletion crypto/notepadcrypt.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*
* Distributed under the terms of the GNU General Public License,
* see License.txt for details.
Expand Down
2 changes: 1 addition & 1 deletion crypto/rijndael-alg-fst.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* rijndael-alg-fst.c
*
* @version 3.0 (December 2000)
Expand Down
2 changes: 1 addition & 1 deletion crypto/rijndael-alg-fst.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* rijndael-alg-fst.h
*
* @version 3.0 (December 2000)
Expand Down
2 changes: 1 addition & 1 deletion crypto/rijndael-api-fst.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* rijndael-api-fst.c
*
* @version 2.9 (December 2000)
Expand Down
52 changes: 26 additions & 26 deletions crypto/rijndael-api-fst.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* rijndael-api-fst.h
*
* @version 2.9 (December 2000)
Expand Down Expand Up @@ -49,12 +49,12 @@ modes used by AES encryption
*/
typedef enum
{
AES_DIR_ENCRYPT = 0, /* @emem Are we encrpyting? */
AES_DIR_DECRYPT = 1, /* @emem Are we decrpyting? */
AES_MODE_ECB = 1, /* @emem Are we ciphering in ECB mode? */
AES_MODE_CBC = 2, /* @emem Are we ciphering in CBC mode? */
AES_MODE_CFB1 = 3, /* @emem Are we ciphering in 1-bit CFB mode? */
AES_BITSPERBLOCK = 128 /* @emem Default number of bits in a cipher block */
AES_DIR_ENCRYPT = 0, /* @emem Are we encrpyting? */
AES_DIR_DECRYPT = 1, /* @emem Are we decrpyting? */
AES_MODE_ECB = 1, /* @emem Are we ciphering in ECB mode? */
AES_MODE_CBC = 2, /* @emem Are we ciphering in CBC mode? */
AES_MODE_CFB1 = 3, /* @emem Are we ciphering in 1-bit CFB mode? */
AES_BITSPERBLOCK = 128 /* @emem Default number of bits in a cipher block */
} AES_MODES;

/* @enum AES_ERROR_CODES |
Expand All @@ -63,24 +63,24 @@ error codes used by AES encryption
*/
typedef enum
{
BAD_KEY_DIR = -1, /* @emem Key direction is invalid, e.g., unknown value */
BAD_KEY_MAT = -2, /* @emem Key material not of correct length */
BAD_KEY_INSTANCE = -3, /* @emem Key passed is not valid */
BAD_CIPHER_MODE = -4, /* @emem Params struct passed to cipherInit invalid */
BAD_CIPHER_STATE = -5, /* @emem Cipher in wrong state (e.g., not initialized) */
BAD_BLOCK_LENGTH = -6, /* @emem bad block length */
BAD_CIPHER_INSTANCE = -7, /* @emem bad cypher instance */
BAD_DATA = -8, /* @emem Data contents are invalid, e.g., invalid padding */
BAD_OTHER = -9 /* @emem Unknown error */
BAD_KEY_DIR = -1, /* @emem Key direction is invalid, e.g., unknown value */
BAD_KEY_MAT = -2, /* @emem Key material not of correct length */
BAD_KEY_INSTANCE = -3, /* @emem Key passed is not valid */
BAD_CIPHER_MODE = -4, /* @emem Params struct passed to cipherInit invalid */
BAD_CIPHER_STATE = -5, /* @emem Cipher in wrong state (e.g., not initialized) */
BAD_BLOCK_LENGTH = -6, /* @emem bad block length */
BAD_CIPHER_INSTANCE = -7, /* @emem bad cypher instance */
BAD_DATA = -8, /* @emem Data contents are invalid, e.g., invalid padding */
BAD_OTHER = -9 /* @emem Unknown error */
} AES_ERROR_CODES;
/* @enum AES_CONSTANTS |
misc constants used by AES encryption
<nl>Overview: <l Crypto Utilities>
*/
typedef enum
{
AES_MAX_KEY_SIZE = 64, /* @emem # of ASCII char's needed to represent a key in hex */
AES_MAX_IV_SIZE = 16 /* @emem # bytes needed to represent an IV */
AES_MAX_KEY_SIZE = 64, /* @emem # of ASCII char's needed to represent a key in hex */
AES_MAX_IV_SIZE = 16 /* @emem # bytes needed to represent an IV */
} AES_CONSTANTS;

/* @struct AES_keyInstance |
Expand All @@ -91,9 +91,9 @@ encrypt or decrypt many files.

typedef struct
{
AES_MODES direction; /* Key used for encrypting or decrypting? */
int keyLen; /* Length of the key */
char TheKey[AES_MAX_KEY_SIZE+1]; /* Raw key data in ASCII, e.g., user input or KAT values */
AES_MODES direction; /* Key used for encrypting or decrypting? */
int keyLen; /* Length of the key */
char TheKey[AES_MAX_KEY_SIZE+1]; /* Raw key data in ASCII, e.g., user input or KAT values */
int Nr; /* key-length-dependent number of rounds */
u32 rk[4*(MAXNR + 1)]; /* key schedule */
u32 ek[4*(MAXNR + 1)]; /* CFB1 key schedule (encryption only) */
Expand All @@ -110,8 +110,8 @@ of decrypted.

typedef struct
{ /* changed order of the components */
AES_MODES mode; /* MODE_ECB, MODE_CBC, or MODE_CFB1 */
BYTE IV[AES_MAX_IV_SIZE]; /* A possible Initialization Vector for ciphering */
AES_MODES mode; /* MODE_ECB, MODE_CBC, or MODE_CFB1 */
BYTE IV[AES_MAX_IV_SIZE]; /* A possible Initialization Vector for ciphering */
} AES_cipherInstance;


Expand All @@ -138,20 +138,20 @@ int AES_cipherInit(AES_cipherInstance *cipher, AES_MODES mode, char *IV);
int AES_bin_cipherInit(AES_cipherInstance *cipher, AES_MODES mode, BYTE *IV);

int AES_blockEncrypt(AES_cipherInstance *cipher, AES_keyInstance *key,
BYTE *input, int inputLen, BYTE *outBuffer);
BYTE *input, int inputLen, BYTE *outBuffer);

int AES_padEncrypt(AES_cipherInstance *cipher, AES_keyInstance *key,
BYTE *input, int inputOctets, BYTE *outBuffer);

int AES_blockDecrypt(AES_cipherInstance *cipher, AES_keyInstance *key,
BYTE *input, int inputLen, BYTE *outBuffer);
BYTE *input, int inputLen, BYTE *outBuffer);

int AES_padDecrypt(AES_cipherInstance *cipher, AES_keyInstance *key,
BYTE *input, int inputOctets, BYTE *outBuffer);

#ifdef INTERMEDIATE_VALUE_KAT
int cipherUpdateRounds(AES_cipherInstance *cipher, AES_keyInstance *key,
BYTE *input, int inputLen, BYTE *outBuffer, int rounds);
BYTE *input, int inputLen, BYTE *outBuffer, int rounds);
#endif /* INTERMEDIATE_VALUE_KAT */

#endif /* __RIJNDAEL_API_FST_H */
2 changes: 1 addition & 1 deletion crypto/sha-256.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* FIPS-180-2 compliant SHA-256 implementation
*
* Copyright (C) 2001-2003 Christophe Devine
Expand Down
2 changes: 1 addition & 1 deletion crypto/sha-256.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef _SHA256_H
#ifndef _SHA256_H
#define _SHA256_H

#ifndef uint8
Expand Down
Binary file modified language/common_res.rc
Binary file not shown.
Binary file modified language/np3_af_za/dialogs_af_za.rc
Binary file not shown.
Binary file modified language/np3_af_za/dllmain.cpp
Binary file not shown.
Binary file modified language/np3_af_za/encode_af_za.rc
Binary file not shown.
Binary file modified language/np3_af_za/lexer_af_za.rc
Binary file not shown.
Binary file modified language/np3_af_za/menu_af_za.rc
Binary file not shown.
Binary file modified language/np3_af_za/np3_af_za.cpp
Binary file not shown.
Binary file modified language/np3_af_za/np3_af_za.rc
Binary file not shown.
4 changes: 4 additions & 0 deletions language/np3_af_za/np3_af_za.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;NP3AFAF_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -131,6 +132,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;NP3AFAF_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -164,6 +166,7 @@
<ConformanceMode>true</ConformanceMode>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -199,6 +202,7 @@
<ConformanceMode>true</ConformanceMode>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
Loading

0 comments on commit 637bd98

Please sign in to comment.