lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [17/50] [abbrv] git commit: refs/heads/master - Rename _UTF8 and _Str to _Utf8
Date Fri, 11 Oct 2013 13:31:55 GMT
Rename _UTF8 and _Str to _Utf8


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c3ccd8cd
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c3ccd8cd
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c3ccd8cd

Branch: refs/heads/master
Commit: c3ccd8cd246e99ed582dec839ca938fcdae68fa4
Parents: e47845a
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Sep 14 16:22:34 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Fri Oct 11 15:28:16 2013 +0200

----------------------------------------------------------------------
 c/src/Lucy/Analysis/RegexTokenizer.c            |  8 ++--
 c/src/Lucy/Index/DocReader.c                    |  2 +-
 clownfish/runtime/core/Clownfish/CharBuf.c      | 28 ++++++------
 clownfish/runtime/core/Clownfish/CharBuf.cfh    |  6 +--
 clownfish/runtime/core/Clownfish/Err.c          |  2 +-
 clownfish/runtime/core/Clownfish/Hash.c         |  6 +--
 clownfish/runtime/core/Clownfish/Hash.cfh       |  8 ++--
 clownfish/runtime/core/Clownfish/String.c       | 34 +++++++--------
 clownfish/runtime/core/Clownfish/String.cfh     | 16 +++----
 .../runtime/core/Clownfish/Test/TestCharBuf.c   | 12 ++---
 .../runtime/core/Clownfish/Test/TestHash.c      |  6 +--
 clownfish/runtime/core/Clownfish/Test/TestNum.c | 12 ++---
 clownfish/runtime/core/Clownfish/Test/TestObj.c |  4 +-
 .../runtime/core/Clownfish/Test/TestString.c    | 20 ++++-----
 .../runtime/core/Clownfish/Test/TestVArray.c    | 10 ++---
 clownfish/runtime/core/Clownfish/VTable.c       |  2 +-
 clownfish/runtime/perl/xs/XSBind.c              |  8 ++--
 core/Lucy/Analysis/Analyzer.c                   |  6 +--
 core/Lucy/Analysis/EasyAnalyzer.c               |  4 +-
 core/Lucy/Analysis/Normalizer.c                 | 20 ++++-----
 core/Lucy/Analysis/PolyAnalyzer.c               |  6 +--
 core/Lucy/Analysis/RegexTokenizer.c             | 12 ++---
 core/Lucy/Analysis/RegexTokenizer.cfh           |  4 +-
 core/Lucy/Analysis/SnowballStemmer.c            |  4 +-
 core/Lucy/Analysis/SnowballStopFilter.c         |  8 ++--
 core/Lucy/Analysis/StandardTokenizer.c          | 12 ++---
 core/Lucy/Analysis/StandardTokenizer.cfh        |  4 +-
 core/Lucy/Document/HitDoc.c                     |  4 +-
 core/Lucy/Highlight/Highlighter.c               |  8 ++--
 core/Lucy/Index/BackgroundMerger.c              |  4 +-
 core/Lucy/Index/DataWriter.c                    |  4 +-
 core/Lucy/Index/DeletionsReader.c               |  8 ++--
 core/Lucy/Index/DeletionsWriter.c               | 20 ++++-----
 core/Lucy/Index/DocReader.c                     |  4 +-
 core/Lucy/Index/DocVector.c                     |  2 +-
 core/Lucy/Index/DocWriter.c                     |  4 +-
 core/Lucy/Index/FilePurger.c                    |  8 ++--
 core/Lucy/Index/HighlightReader.c               |  6 +--
 core/Lucy/Index/HighlightWriter.c               |  4 +-
 core/Lucy/Index/IndexManager.c                  | 10 ++---
 core/Lucy/Index/Indexer.c                       | 10 ++---
 core/Lucy/Index/LexiconWriter.c                 | 14 +++---
 core/Lucy/Index/PolyReader.c                    |  4 +-
 core/Lucy/Index/PostingListReader.c             |  6 +--
 core/Lucy/Index/PostingListWriter.c             |  4 +-
 core/Lucy/Index/SegLexicon.c                    |  6 +--
 core/Lucy/Index/Segment.c                       | 32 +++++++-------
 core/Lucy/Index/Segment.cfh                     |  6 +--
 core/Lucy/Index/Similarity.c                    |  6 +--
 core/Lucy/Index/Snapshot.c                      | 18 ++++----
 core/Lucy/Index/SortReader.c                    | 10 ++---
 core/Lucy/Index/SortWriter.c                    | 10 ++---
 core/Lucy/Plan/BlobType.c                       | 22 +++++-----
 core/Lucy/Plan/FullTextType.c                   | 36 +++++++--------
 core/Lucy/Plan/NumericType.c                    | 36 +++++++--------
 core/Lucy/Plan/Schema.c                         | 40 ++++++++---------
 core/Lucy/Plan/StringType.c                     | 26 +++++------
 core/Lucy/Search/ANDQuery.c                     |  4 +-
 core/Lucy/Search/Compiler.c                     |  2 +-
 core/Lucy/Search/LeafQuery.c                    |  8 ++--
 core/Lucy/Search/NoMatchQuery.c                 |  6 +--
 core/Lucy/Search/ORQuery.c                      |  4 +-
 core/Lucy/Search/PhraseQuery.c                  | 14 +++---
 core/Lucy/Search/PolyQuery.c                    |  4 +-
 core/Lucy/Search/Query.c                        | 12 ++---
 core/Lucy/Search/QueryParser.c                  | 10 ++---
 core/Lucy/Search/QueryParser/QueryLexer.c       |  2 +-
 core/Lucy/Search/RangeQuery.c                   | 28 ++++++------
 core/Lucy/Search/TermQuery.c                    |  8 ++--
 core/Lucy/Store/CompoundFileReader.c            |  8 ++--
 core/Lucy/Store/CompoundFileWriter.c            | 16 +++----
 core/Lucy/Store/FSFolder.c                      |  6 +--
 core/Lucy/Store/Folder.c                        |  4 +-
 core/Lucy/Store/Lock.c                          | 16 +++----
 core/Lucy/Store/SharedLock.c                    |  8 ++--
 core/Lucy/Test/Analysis/TestNormalizer.c        | 10 ++---
 core/Lucy/Test/Analysis/TestSnowballStemmer.c   |  4 +-
 .../Lucy/Test/Analysis/TestSnowballStopFilter.c |  4 +-
 core/Lucy/Test/Analysis/TestStandardTokenizer.c | 14 +++---
 core/Lucy/Test/Highlight/TestHighlighter.c      | 36 +++++++--------
 core/Lucy/Test/Index/TestSegment.c              | 16 +++----
 core/Lucy/Test/Plan/TestFullTextType.c          |  2 +-
 core/Lucy/Test/Search/TestQueryParserSyntax.c   |  2 +-
 core/Lucy/Test/Search/TestSortSpec.c            |  4 +-
 core/Lucy/Test/Store/TestCompoundFileReader.c   | 12 ++---
 core/Lucy/Test/Store/TestCompoundFileWriter.c   |  4 +-
 core/Lucy/Test/Store/TestFSFolder.c             |  2 +-
 core/Lucy/Test/Store/TestFileHandle.c           |  2 +-
 core/Lucy/Test/Store/TestRAMFileHandle.c        |  2 +-
 core/Lucy/Test/Store/TestRAMFolder.c            |  2 +-
 core/Lucy/Test/Util/TestIndexFileNames.c        |  2 +-
 core/Lucy/Test/Util/TestJson.c                  | 10 ++---
 core/Lucy/Util/Freezer.c                        |  2 +-
 core/Lucy/Util/IndexFileNames.c                 |  4 +-
 core/Lucy/Util/Json.c                           | 46 ++++++++++----------
 core/LucyX/Search/ProximityQuery.c              | 20 ++++-----
 perl/xs/Lucy/Analysis/RegexTokenizer.c          | 10 ++---
 perl/xs/Lucy/Document/Doc.c                     | 18 ++++----
 98 files changed, 512 insertions(+), 512 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/c/src/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Analysis/RegexTokenizer.c b/c/src/Lucy/Analysis/RegexTokenizer.c
index 4780430..bb3f96b 100644
--- a/c/src/Lucy/Analysis/RegexTokenizer.c
+++ b/c/src/Lucy/Analysis/RegexTokenizer.c
@@ -101,8 +101,8 @@ RegexTokenizer_Destroy_IMP(RegexTokenizer *self) {
 }
 
 void
-RegexTokenizer_Tokenize_Str_IMP(RegexTokenizer *self, const char *string,
-                                size_t string_len, Inversion *inversion) {
+RegexTokenizer_Tokenize_Utf8_IMP(RegexTokenizer *self, const char *string,
+                                 size_t string_len, Inversion *inversion) {
     RegexTokenizerIVARS *const ivars = RegexTokenizer_IVARS(self);
     pcre      *re          = (pcre*)ivars->token_re;
     int        byte_offset = 0;
@@ -189,8 +189,8 @@ RegexTokenizer_Destroy_IMP(RegexTokenizer *self) {
 }
 
 void
-RegexTokenizer_Tokenize_Str_IMP(RegexTokenizer *self, const char *string,
-                                size_t string_len, Inversion *inversion) {
+RegexTokenizer_Tokenize_Utf8_IMP(RegexTokenizer *self, const char *string,
+                                 size_t string_len, Inversion *inversion) {
     UNUSED_VAR(self);
     UNUSED_VAR(string);
     UNUSED_VAR(string_len);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/c/src/Lucy/Index/DocReader.c
----------------------------------------------------------------------
diff --git a/c/src/Lucy/Index/DocReader.c b/c/src/Lucy/Index/DocReader.c
index dc3619b..7904c45 100644
--- a/c/src/Lucy/Index/DocReader.c
+++ b/c/src/Lucy/Index/DocReader.c
@@ -111,7 +111,7 @@ DefDocReader_Fetch_Doc_IMP(DefaultDocReader *self, int32_t doc_id) {
         }
 
         // Store the value.
-        Hash_Store_Str(fields, field_name, field_name_len, value);
+        Hash_Store_Utf8(fields, field_name, field_name_len, value);
     }
     FREEMEM(field_name);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/CharBuf.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/CharBuf.c b/clownfish/runtime/core/Clownfish/CharBuf.c
index 74919dd..9f48caa 100644
--- a/clownfish/runtime/core/Clownfish/CharBuf.c
+++ b/clownfish/runtime/core/Clownfish/CharBuf.c
@@ -173,7 +173,7 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
         while (slice_end < pattern_end && *slice_end != '%') { slice_end++; }
         if (pattern != slice_end) {
             size_t size = slice_end - pattern;
-            CB_Cat_Trusted_UTF8(self, pattern, size);
+            CB_Cat_Trusted_Utf8(self, pattern, size);
             pattern = slice_end;
         }
 
@@ -182,13 +182,13 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
 
             switch (*pattern) {
                 case '%': {
-                        CB_Cat_Trusted_UTF8(self, "%", 1);
+                        CB_Cat_Trusted_Utf8(self, "%", 1);
                     }
                     break;
                 case 'o': {
                         Obj *obj = va_arg(args, Obj*);
                         if (!obj) {
-                            CB_Cat_Trusted_UTF8(self, "[NULL]", 6);
+                            CB_Cat_Trusted_Utf8(self, "[NULL]", 6);
                         }
                         else if (Obj_Is_A(obj, STRING)) {
                             CB_Cat(self, (String*)obj);
@@ -219,7 +219,7 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
                             S_die_invalid_pattern(pattern_start);
                         }
                         size = sprintf(buf, "%" PRId64, val);
-                        CB_Cat_Trusted_UTF8(self, buf, size);
+                        CB_Cat_Trusted_Utf8(self, buf, size);
                     }
                     break;
                 case 'u': {
@@ -241,7 +241,7 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
                             S_die_invalid_pattern(pattern_start);
                         }
                         size = sprintf(buf, "%" PRIu64, val);
-                        CB_Cat_Trusted_UTF8(self, buf, size);
+                        CB_Cat_Trusted_Utf8(self, buf, size);
                     }
                     break;
                 case 'f': {
@@ -249,7 +249,7 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
                             double num  = va_arg(args, double);
                             char bigbuf[512];
                             size_t size = sprintf(bigbuf, "%g", num);
-                            CB_Cat_Trusted_UTF8(self, bigbuf, size);
+                            CB_Cat_Trusted_Utf8(self, bigbuf, size);
                             pattern += 2;
                         }
                         else {
@@ -261,7 +261,7 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
                         if (pattern[1] == '3' && pattern[2] == '2') {
                             unsigned long val = va_arg(args, uint32_t);
                             size_t size = sprintf(buf, "%.8lx", val);
-                            CB_Cat_Trusted_UTF8(self, buf, size);
+                            CB_Cat_Trusted_Utf8(self, buf, size);
                             pattern += 2;
                         }
                         else {
@@ -272,15 +272,15 @@ CB_VCatF_IMP(CharBuf *self, const char *pattern, va_list args) {
                 case 's': {
                         char *string = va_arg(args, char*);
                         if (string == NULL) {
-                            CB_Cat_Trusted_UTF8(self, "[NULL]", 6);
+                            CB_Cat_Trusted_Utf8(self, "[NULL]", 6);
                         }
                         else {
                             size_t size = strlen(string);
                             if (StrHelp_utf8_valid(string, size)) {
-                                CB_Cat_Trusted_UTF8(self, string, size);
+                                CB_Cat_Trusted_Utf8(self, string, size);
                             }
                             else {
-                                CB_Cat_Trusted_UTF8(self, "[INVALID UTF8]", 14);
+                                CB_Cat_Trusted_Utf8(self, "[INVALID UTF8]", 14);
                             }
                         }
                     }
@@ -330,7 +330,7 @@ CB_Clone_IMP(CharBuf *self) {
 }
 
 void
-CB_Mimic_UTF8_IMP(CharBuf *self, const char* ptr, size_t size) {
+CB_Mimic_Utf8_IMP(CharBuf *self, const char* ptr, size_t size) {
     if (!StrHelp_utf8_valid(ptr, size)) {
         DIE_INVALID_UTF8(ptr, size);
     }
@@ -362,15 +362,15 @@ CB_Mimic_IMP(CharBuf *self, Obj *other) {
 }
 
 void
-CB_Cat_UTF8_IMP(CharBuf *self, const char* ptr, size_t size) {
+CB_Cat_Utf8_IMP(CharBuf *self, const char* ptr, size_t size) {
     if (!StrHelp_utf8_valid(ptr, size)) {
         DIE_INVALID_UTF8(ptr, size);
     }
-    CB_Cat_Trusted_UTF8_IMP(self, ptr, size);
+    CB_Cat_Trusted_Utf8_IMP(self, ptr, size);
 }
 
 void
-CB_Cat_Trusted_UTF8_IMP(CharBuf *self, const char* ptr, size_t size) {
+CB_Cat_Trusted_Utf8_IMP(CharBuf *self, const char* ptr, size_t size) {
     const size_t new_size = self->size + size;
     if (new_size >= self->cap) {
         size_t amount = Memory_oversize(new_size, sizeof(char));

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/CharBuf.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/CharBuf.cfh b/clownfish/runtime/core/Clownfish/CharBuf.cfh
index a08ba4f..da48822 100644
--- a/clownfish/runtime/core/Clownfish/CharBuf.cfh
+++ b/clownfish/runtime/core/Clownfish/CharBuf.cfh
@@ -63,18 +63,18 @@ class Clownfish::CharBuf cnick CB
     Mimic(CharBuf *self, Obj *other);
 
     void
-    Mimic_UTF8(CharBuf *self, const char *ptr, size_t size);
+    Mimic_Utf8(CharBuf *self, const char *ptr, size_t size);
 
     /** Concatenate the passed-in string onto the end of the CharBuf.
      */
     void
-    Cat_UTF8(CharBuf *self, const char *ptr, size_t size);
+    Cat_Utf8(CharBuf *self, const char *ptr, size_t size);
 
     /** Concatenate the supplied text onto the end of the CharBuf.  Don't
      * check for UTF-8 validity.
      */
     void
-    Cat_Trusted_UTF8(CharBuf *self, const char *ptr, size_t size);
+    Cat_Trusted_Utf8(CharBuf *self, const char *ptr, size_t size);
 
     /** Concatenate the contents of <code>string</code> onto the end of the
      * caller.

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Err.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Err.c b/clownfish/runtime/core/Clownfish/Err.c
index ade23a3..7ae899a 100644
--- a/clownfish/runtime/core/Clownfish/Err.c
+++ b/clownfish/runtime/core/Clownfish/Err.c
@@ -157,7 +157,7 @@ void
 Err_Add_Frame_IMP(Err *self, const char *file, int line, const char *func) {
     CharBuf *buf = CB_new_from_str(self->mess);
 
-    if (!Str_Ends_With_Str(self->mess, "\n", 1)) {
+    if (!Str_Ends_With_Utf8(self->mess, "\n", 1)) {
         CB_Cat_Char(buf, '\n');
     }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Hash.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Hash.c b/clownfish/runtime/core/Clownfish/Hash.c
index 7e3fb2e..02e9794 100644
--- a/clownfish/runtime/core/Clownfish/Hash.c
+++ b/clownfish/runtime/core/Clownfish/Hash.c
@@ -159,7 +159,7 @@ Hash_Store_IMP(Hash *self, Obj *key, Obj *value) {
 }
 
 void
-Hash_Store_Str_IMP(Hash *self, const char *key, size_t key_len, Obj *value) {
+Hash_Store_Utf8_IMP(Hash *self, const char *key, size_t key_len, Obj *value) {
     StackString *key_buf = SSTR_WRAP_STR((char*)key, key_len);
     Hash_do_store(self, (Obj*)key_buf, value,
                   SStr_Hash_Sum(key_buf), false);
@@ -173,7 +173,7 @@ Hash_Make_Key_IMP(Hash *self, Obj *key, int32_t hash_sum) {
 }
 
 Obj*
-Hash_Fetch_Str_IMP(Hash *self, const char *key, size_t key_len) {
+Hash_Fetch_Utf8_IMP(Hash *self, const char *key, size_t key_len) {
     StackString *key_buf = SSTR_WRAP_STR(key, key_len);
     return Hash_Fetch_IMP(self, (Obj*)key_buf);
 }
@@ -225,7 +225,7 @@ Hash_Delete_IMP(Hash *self, const Obj *key) {
 }
 
 Obj*
-Hash_Delete_Str_IMP(Hash *self, const char *key, size_t key_len) {
+Hash_Delete_Utf8_IMP(Hash *self, const char *key, size_t key_len) {
     StackString *key_buf = SSTR_WRAP_STR(key, key_len);
     return Hash_Delete_IMP(self, (Obj*)key_buf);
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Hash.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Hash.cfh b/clownfish/runtime/core/Clownfish/Hash.cfh
index 397cc2d..5f289fd 100644
--- a/clownfish/runtime/core/Clownfish/Hash.cfh
+++ b/clownfish/runtime/core/Clownfish/Hash.cfh
@@ -57,8 +57,8 @@ class Clownfish::Hash inherits Clownfish::Obj {
     Store(Hash *self, Obj *key, decremented Obj *value);
 
     void
-    Store_Str(Hash *self, const char *str, size_t len,
-              decremented Obj *value);
+    Store_Utf8(Hash *self, const char *str, size_t len,
+               decremented Obj *value);
 
     /** Fetch the value associated with <code>key</code>.
      *
@@ -68,7 +68,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
     Fetch(Hash *self, const Obj *key);
 
     nullable Obj*
-    Fetch_Str(Hash *self, const char *key, size_t key_len);
+    Fetch_Utf8(Hash *self, const char *key, size_t key_len);
 
     /** Attempt to delete a key-value pair from the hash.
      *
@@ -79,7 +79,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
     Delete(Hash *self, const Obj *key);
 
     incremented nullable Obj*
-    Delete_Str(Hash *self, const char *key, size_t key_ley);
+    Delete_Utf8(Hash *self, const char *key, size_t key_ley);
 
     /** Prepare to iterate over all the key-value pairs in the hash.
      *

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.c b/clownfish/runtime/core/Clownfish/String.c
index d39f271..d68aacf 100644
--- a/clownfish/runtime/core/Clownfish/String.c
+++ b/clownfish/runtime/core/Clownfish/String.c
@@ -249,19 +249,19 @@ Str_Clone_IMP(String *self) {
 
 String*
 Str_Cat_IMP(String *self, const String *other) {
-    return Str_Cat_Trusted_UTF8(self, other->ptr, other->size);
+    return Str_Cat_Trusted_Utf8(self, other->ptr, other->size);
 }
 
 String*
-Str_Cat_UTF8_IMP(String *self, const char* ptr, size_t size) {
+Str_Cat_Utf8_IMP(String *self, const char* ptr, size_t size) {
     if (!StrHelp_utf8_valid(ptr, size)) {
         DIE_INVALID_UTF8(ptr, size);
     }
-    return Str_Cat_Trusted_UTF8(self, ptr, size);
+    return Str_Cat_Trusted_Utf8(self, ptr, size);
 }
 
 String*
-Str_Cat_Trusted_UTF8_IMP(String *self, const char* ptr, size_t size) {
+Str_Cat_Trusted_Utf8_IMP(String *self, const char* ptr, size_t size) {
     size_t  result_size = self->size + size;
     char   *result_ptr  = (char*)MALLOCATE(result_size + 1);
     memcpy(result_ptr, self->ptr, self->size);
@@ -273,11 +273,11 @@ Str_Cat_Trusted_UTF8_IMP(String *self, const char* ptr, size_t size) {
 
 bool
 Str_Starts_With_IMP(String *self, const String *prefix) {
-    return Str_Starts_With_Str_IMP(self, prefix->ptr, prefix->size);
+    return Str_Starts_With_Utf8_IMP(self, prefix->ptr, prefix->size);
 }
 
 bool
-Str_Starts_With_Str_IMP(String *self, const char *prefix, size_t size) {
+Str_Starts_With_Utf8_IMP(String *self, const char *prefix, size_t size) {
     if (size <= self->size
         && (memcmp(self->ptr, prefix, size) == 0)
        ) {
@@ -293,7 +293,7 @@ Str_Equals_IMP(String *self, Obj *other) {
     String *const twin = (String*)other;
     if (twin == self)              { return true; }
     if (!Obj_Is_A(other, STRING)) { return false; }
-    return Str_Equals_Str_IMP(self, twin->ptr, twin->size);
+    return Str_Equals_Utf8_IMP(self, twin->ptr, twin->size);
 }
 
 int32_t
@@ -303,7 +303,7 @@ Str_Compare_To_IMP(String *self, Obj *other) {
 }
 
 bool
-Str_Equals_Str_IMP(String *self, const char *ptr, size_t size) {
+Str_Equals_Utf8_IMP(String *self, const char *ptr, size_t size) {
     if (self->size != size) {
         return false;
     }
@@ -312,11 +312,11 @@ Str_Equals_Str_IMP(String *self, const char *ptr, size_t size) {
 
 bool
 Str_Ends_With_IMP(String *self, const String *postfix) {
-    return Str_Ends_With_Str_IMP(self, postfix->ptr, postfix->size);
+    return Str_Ends_With_Utf8_IMP(self, postfix->ptr, postfix->size);
 }
 
 bool
-Str_Ends_With_Str_IMP(String *self, const char *postfix, size_t postfix_len) {
+Str_Ends_With_Utf8_IMP(String *self, const char *postfix, size_t postfix_len) {
     if (postfix_len <= self->size) {
         char *start = self->ptr + self->size - postfix_len;
         if (memcmp(start, postfix, postfix_len) == 0) {
@@ -329,11 +329,11 @@ Str_Ends_With_Str_IMP(String *self, const char *postfix, size_t postfix_len) {
 
 int64_t
 Str_Find_IMP(String *self, const String *substring) {
-    return Str_Find_Str(self, substring->ptr, substring->size);
+    return Str_Find_Utf8(self, substring->ptr, substring->size);
 }
 
 int64_t
-Str_Find_Str_IMP(String *self, const char *ptr, size_t size) {
+Str_Find_Utf8_IMP(String *self, const char *ptr, size_t size) {
     StackStringIterator *iter = STR_STACKTOP(self);
     int64_t location = 0;
 
@@ -824,11 +824,11 @@ StrIter_Skip_Prev_Whitespace_IMP(StringIterator *self) {
 
 bool
 StrIter_Starts_With_IMP(StringIterator *self, String *prefix) {
-    return StrIter_Starts_With_UTF8_IMP(self, prefix->ptr, prefix->size);
+    return StrIter_Starts_With_Utf8_IMP(self, prefix->ptr, prefix->size);
 }
 
 bool
-StrIter_Starts_With_UTF8_IMP(StringIterator *self, const char *prefix,
+StrIter_Starts_With_Utf8_IMP(StringIterator *self, const char *prefix,
                              size_t size) {
     String *string      = self->string;
     size_t  byte_offset = self->byte_offset;
@@ -844,12 +844,12 @@ StrIter_Starts_With_UTF8_IMP(StringIterator *self, const char *prefix,
 
 bool
 StrIter_Ends_With_IMP(StringIterator *self, String *postfix) {
-    return StrIter_Ends_With_UTF8_IMP(self, postfix->ptr, postfix->size);
+    return StrIter_Ends_With_Utf8_IMP(self, postfix->ptr, postfix->size);
 }
 
 bool
-StrIter_Ends_With_UTF8_IMP(StringIterator *self, const char *postfix,
-                             size_t size) {
+StrIter_Ends_With_Utf8_IMP(StringIterator *self, const char *postfix,
+                           size_t size) {
     String *string      = self->string;
     size_t  byte_offset = self->byte_offset;
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/String.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/String.cfh b/clownfish/runtime/core/Clownfish/String.cfh
index ee78652..22138db 100644
--- a/clownfish/runtime/core/Clownfish/String.cfh
+++ b/clownfish/runtime/core/Clownfish/String.cfh
@@ -97,13 +97,13 @@ class Clownfish::String cnick Str
     /** Return the concatenation of the String and the passed-in raw UTF-8.
      */
     incremented String*
-    Cat_UTF8(String *self, const char *ptr, size_t size);
+    Cat_Utf8(String *self, const char *ptr, size_t size);
 
     /** Return the concatenation of the String and the passed-in raw UTF-8.
      * Don't check for UTF-8 validity.
      */
     incremented String*
-    Cat_Trusted_UTF8(String *self, const char *ptr, size_t size);
+    Cat_Trusted_Utf8(String *self, const char *ptr, size_t size);
 
     /** Replace all instances of one character for the other.
      *
@@ -131,7 +131,7 @@ class Clownfish::String cnick Str
     /** Test whether the String starts with the passed-in string.
      */
     bool
-    Starts_With_Str(String *self, const char *prefix, size_t size);
+    Starts_With_Utf8(String *self, const char *prefix, size_t size);
 
     /** Test whether the String ends with the content of another.
      */
@@ -141,7 +141,7 @@ class Clownfish::String cnick Str
     /** Test whether the String ends with the passed-in string.
      */
     bool
-    Ends_With_Str(String *self, const char *postfix, size_t size);
+    Ends_With_Utf8(String *self, const char *postfix, size_t size);
 
     /** Return the location of the substring within the String (measured in
      * code points), or -1 if the substring does not match.
@@ -150,12 +150,12 @@ class Clownfish::String cnick Str
     Find(String *self, const String *substring);
 
     int64_t
-    Find_Str(String *self, const char *ptr, size_t size);
+    Find_Utf8(String *self, const char *ptr, size_t size);
 
     /** Test whether the String matches the passed-in string.
      */
     bool
-    Equals_Str(String *self, const char *ptr, size_t size);
+    Equals_Utf8(String *self, const char *ptr, size_t size);
 
     /** Return the number of Unicode code points in the object's string.
      */
@@ -394,7 +394,7 @@ class Clownfish::StringIterator cnick StrIter
      * string.
      */
     bool
-    Starts_With_UTF8(StringIterator *self, const char *prefix, size_t size);
+    Starts_With_Utf8(StringIterator *self, const char *prefix, size_t size);
 
     /** Test whether the content before the iterator ends with
      * <code>postfix</code>.
@@ -406,7 +406,7 @@ class Clownfish::StringIterator cnick StrIter
      * string.
      */
     bool
-    Ends_With_UTF8(StringIterator *self, const char *postfix, size_t size);
+    Ends_With_Utf8(StringIterator *self, const char *postfix, size_t size);
 
     public void
     Destroy(StringIterator *self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c b/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c
index 31865f9..48c36a1 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestCharBuf.c
@@ -74,13 +74,13 @@ test_Cat(TestBatchRunner *runner) {
     DECREF(got);
 
     got = S_get_cb("a");
-    CB_Cat_UTF8(got, smiley, smiley_len);
-    TEST_TRUE(runner, S_cb_equals(got, wanted), "Cat_UTF8");
+    CB_Cat_Utf8(got, smiley, smiley_len);
+    TEST_TRUE(runner, S_cb_equals(got, wanted), "Cat_Utf8");
     DECREF(got);
 
     got = S_get_cb("a");
-    CB_Cat_Trusted_UTF8(got, smiley, smiley_len);
-    TEST_TRUE(runner, S_cb_equals(got, wanted), "Cat_Trusted_UTF8");
+    CB_Cat_Trusted_Utf8(got, smiley, smiley_len);
+    TEST_TRUE(runner, S_cb_equals(got, wanted), "Cat_Trusted_Utf8");
     DECREF(got);
 
     DECREF(wanted);
@@ -102,8 +102,8 @@ test_Mimic_and_Clone(TestBatchRunner *runner) {
     DECREF(got);
 
     got = S_get_cb("bar");
-    CB_Mimic_UTF8(got, "foo", 3);
-    TEST_TRUE(runner, S_cb_equals(got, wanted), "Mimic_Str");
+    CB_Mimic_Utf8(got, "foo", 3);
+    TEST_TRUE(runner, S_cb_equals(got, wanted), "Mimic_Utf8");
     DECREF(got);
 
     got = CB_Clone(wanted_cb);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Test/TestHash.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestHash.c b/clownfish/runtime/core/Clownfish/Test/TestHash.c
index ef29c7a..ca35f1a 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestHash.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestHash.c
@@ -45,15 +45,15 @@ test_Equals(TestBatchRunner *runner) {
     TEST_TRUE(runner, Hash_Equals(hash, (Obj*)other),
               "Empty hashes are equal");
 
-    Hash_Store_Str(hash, "foo", 3, (Obj*)CFISH_TRUE);
+    Hash_Store_Utf8(hash, "foo", 3, (Obj*)CFISH_TRUE);
     TEST_FALSE(runner, Hash_Equals(hash, (Obj*)other),
                "Add one pair and Equals returns false");
 
-    Hash_Store_Str(other, "foo", 3, (Obj*)CFISH_TRUE);
+    Hash_Store_Utf8(other, "foo", 3, (Obj*)CFISH_TRUE);
     TEST_TRUE(runner, Hash_Equals(hash, (Obj*)other),
               "Add a matching pair and Equals returns true");
 
-    Hash_Store_Str(other, "foo", 3, INCREF(stuff));
+    Hash_Store_Utf8(other, "foo", 3, INCREF(stuff));
     TEST_FALSE(runner, Hash_Equals(hash, (Obj*)other),
                "Non-matching value spoils Equals");
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Test/TestNum.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestNum.c b/clownfish/runtime/core/Clownfish/Test/TestNum.c
index 0334aac..f84c2c0 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestNum.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestNum.c
@@ -44,17 +44,17 @@ test_To_String(TestBatchRunner *runner) {
     String *true_string  = Bool_To_String(CFISH_TRUE);
     String *false_string = Bool_To_String(CFISH_FALSE);
 
-    TEST_TRUE(runner, Str_Starts_With_Str(f32_string, "1.3", 3),
+    TEST_TRUE(runner, Str_Starts_With_Utf8(f32_string, "1.3", 3),
               "Float32_To_String");
-    TEST_TRUE(runner, Str_Starts_With_Str(f64_string, "1.3", 3),
+    TEST_TRUE(runner, Str_Starts_With_Utf8(f64_string, "1.3", 3),
               "Float64_To_String");
-    TEST_TRUE(runner, Str_Equals_Str(i32_string, "2147483647", 10),
+    TEST_TRUE(runner, Str_Equals_Utf8(i32_string, "2147483647", 10),
               "Int32_To_String");
-    TEST_TRUE(runner, Str_Equals_Str(i64_string, "9223372036854775807", 19),
+    TEST_TRUE(runner, Str_Equals_Utf8(i64_string, "9223372036854775807", 19),
               "Int64_To_String");
-    TEST_TRUE(runner, Str_Equals_Str(true_string, "true", 4),
+    TEST_TRUE(runner, Str_Equals_Utf8(true_string, "true", 4),
               "Bool_To_String [true]");
-    TEST_TRUE(runner, Str_Equals_Str(false_string, "false", 5),
+    TEST_TRUE(runner, Str_Equals_Utf8(false_string, "false", 5),
               "Bool_To_String [false]");
 
     DECREF(false_string);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Test/TestObj.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestObj.c b/clownfish/runtime/core/Clownfish/Test/TestObj.c
index c848b7d..191ec33 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestObj.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestObj.c
@@ -67,7 +67,7 @@ static void
 test_To_String(TestBatchRunner *runner) {
     Obj *testobj = S_new_testobj();
     String *string = Obj_To_String(testobj);
-    TEST_TRUE(runner, Str_Find_Str(string, "TestObj", 7) >= 0, "To_String");
+    TEST_TRUE(runner, Str_Find_Utf8(string, "TestObj", 7) >= 0, "To_String");
     DECREF(string);
     DECREF(testobj);
 }
@@ -149,7 +149,7 @@ S_verify_abstract_error(TestBatchRunner *runner, Err_Attempt_t routine,
     Err *error = Err_trap(routine, context);
     TEST_TRUE(runner, error != NULL
               && Err_Is_A(error, ERR) 
-              && Str_Find_Str(Err_Get_Mess(error), "bstract", 7) != -1,
+              && Str_Find_Utf8(Err_Get_Mess(error), "bstract", 7) != -1,
               message);
     DECREF(error);
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Test/TestString.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestString.c b/clownfish/runtime/core/Clownfish/Test/TestString.c
index daecdc6..2b7e911 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestString.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestString.c
@@ -84,14 +84,14 @@ test_Cat(TestBatchRunner *runner) {
     DECREF(source);
 
     source = S_get_str("a");
-    got = Str_Cat_UTF8(source, smiley, smiley_len);
-    TEST_TRUE(runner, Str_Equals(wanted, (Obj*)got), "Cat_UTF8");
+    got = Str_Cat_Utf8(source, smiley, smiley_len);
+    TEST_TRUE(runner, Str_Equals(wanted, (Obj*)got), "Cat_Utf8");
     DECREF(got);
     DECREF(source);
 
     source = S_get_str("a");
-    got = Str_Cat_Trusted_UTF8(source, smiley, smiley_len);
-    TEST_TRUE(runner, Str_Equals(wanted, (Obj*)got), "Cat_Trusted_UTF8");
+    got = Str_Cat_Trusted_Utf8(source, smiley, smiley_len);
+    TEST_TRUE(runner, Str_Equals(wanted, (Obj*)got), "Cat_Trusted_Utf8");
     DECREF(got);
     DECREF(source);
 
@@ -177,28 +177,28 @@ test_Trim(TestBatchRunner *runner) {
     String *got;
 
     got = Str_Trim(ws_smiley);
-    TEST_TRUE(runner, Str_Equals_Str(got, smiley, smiley_len), "Trim");
+    TEST_TRUE(runner, Str_Equals_Utf8(got, smiley, smiley_len), "Trim");
     DECREF(got);
 
     got = Str_Trim_Top(ws_foo);
-    TEST_TRUE(runner, Str_Equals_Str(got, "foo  ", 5), "Trim_Top");
+    TEST_TRUE(runner, Str_Equals_Utf8(got, "foo  ", 5), "Trim_Top");
     DECREF(got);
 
     got = Str_Trim_Tail(ws_foo);
-    TEST_TRUE(runner, Str_Equals_Str(got, "  foo", 5), "Trim_Tail");
+    TEST_TRUE(runner, Str_Equals_Utf8(got, "  foo", 5), "Trim_Tail");
     DECREF(got);
 
     got = Str_Trim(ws_only);
-    TEST_TRUE(runner, Str_Equals_Str(got, "", 0), "Trim with only whitespace");
+    TEST_TRUE(runner, Str_Equals_Utf8(got, "", 0), "Trim with only whitespace");
     DECREF(got);
 
     got = Str_Trim_Top(ws_only);
-    TEST_TRUE(runner, Str_Equals_Str(got, "", 0),
+    TEST_TRUE(runner, Str_Equals_Utf8(got, "", 0),
               "Trim_Top with only whitespace");
     DECREF(got);
 
     got = Str_Trim_Tail(ws_only);
-    TEST_TRUE(runner, Str_Equals_Str(got, "", 0),
+    TEST_TRUE(runner, Str_Equals_Utf8(got, "", 0),
               "Trim_Tail with only whitespace");
     DECREF(got);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/Test/TestVArray.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestVArray.c b/clownfish/runtime/core/Clownfish/Test/TestVArray.c
index 7f7b72b..d22cad0 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestVArray.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestVArray.c
@@ -86,7 +86,7 @@ test_Store_Fetch(TestBatchRunner *runner) {
     VA_Store(array, 2, (Obj*)Str_newf("foo"));
     elem = (String*)CERTIFY(VA_Fetch(array, 2), STRING);
     TEST_INT_EQ(runner, 3, VA_Get_Size(array), "Store updates size");
-    TEST_TRUE(runner, Str_Equals_Str(elem, "foo", 3), "Store");
+    TEST_TRUE(runner, Str_Equals_Utf8(elem, "foo", 3), "Store");
 
     INCREF(elem);
     TEST_INT_EQ(runner, 2, Str_Get_RefCount(elem),
@@ -96,7 +96,7 @@ test_Store_Fetch(TestBatchRunner *runner) {
                 "Displacing elem via Store updates refcount");
     DECREF(elem);
     elem = (String*)CERTIFY(VA_Fetch(array, 2), STRING);
-    TEST_TRUE(runner, Str_Equals_Str(elem, "bar", 3), "Store displacement");
+    TEST_TRUE(runner, Str_Equals_Utf8(elem, "bar", 3), "Store displacement");
 
     DECREF(array);
 }
@@ -115,18 +115,18 @@ test_Push_Pop_Shift_Unshift(TestBatchRunner *runner) {
     TEST_TRUE(runner, NULL != CERTIFY(VA_Fetch(array, 2), STRING), "Push");
 
     elem = (String*)CERTIFY(VA_Shift(array), STRING);
-    TEST_TRUE(runner, Str_Equals_Str(elem, "a", 1), "Shift");
+    TEST_TRUE(runner, Str_Equals_Utf8(elem, "a", 1), "Shift");
     TEST_INT_EQ(runner, VA_Get_Size(array), 2, "size after Shift");
     DECREF(elem);
 
     elem = (String*)CERTIFY(VA_Pop(array), STRING);
-    TEST_TRUE(runner, Str_Equals_Str(elem, "c", 1), "Pop");
+    TEST_TRUE(runner, Str_Equals_Utf8(elem, "c", 1), "Pop");
     TEST_INT_EQ(runner, VA_Get_Size(array), 1, "size after Pop");
     DECREF(elem);
 
     VA_Unshift(array, (Obj*)Str_newf("foo"));
     elem = (String*)CERTIFY(VA_Fetch(array, 0), STRING);
-    TEST_TRUE(runner, Str_Equals_Str(elem, "foo", 3), "Unshift");
+    TEST_TRUE(runner, Str_Equals_Utf8(elem, "foo", 3), "Unshift");
     TEST_INT_EQ(runner, VA_Get_Size(array), 2, "size after Shift");
 
     DECREF(array);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/core/Clownfish/VTable.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VTable.c b/clownfish/runtime/core/Clownfish/VTable.c
index 67ec977..c2bfde8 100644
--- a/clownfish/runtime/core/Clownfish/VTable.c
+++ b/clownfish/runtime/core/Clownfish/VTable.c
@@ -417,7 +417,7 @@ S_find_method(VTable *self, const char *name) {
 
     for (uint32_t i = 0; i < size; i++) {
         Method *method = (Method*)VA_Fetch(self->methods, i);
-        if (Str_Equals_Str(method->name, name, name_len)) {
+        if (Str_Equals_Utf8(method->name, name, name_len)) {
             return method;
         }
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index 39d65d8..379bc7d 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -252,10 +252,10 @@ S_perl_hash_to_cfish_hash(HV *phash) {
             // this.
             SV   *key_sv  = HeKEY_sv(entry);
             char *key_str = SvPVutf8(key_sv, key_len);
-            CFISH_Hash_Store_Str(retval, key_str, key_len, value);
+            CFISH_Hash_Store_Utf8(retval, key_str, key_len, value);
         }
         else if (HeKUTF8(entry)) {
-            CFISH_Hash_Store_Str(retval, HeKEY(entry), key_len, value);
+            CFISH_Hash_Store_Utf8(retval, HeKEY(entry), key_len, value);
         }
         else {
             char *key_str = HeKEY(entry);
@@ -264,12 +264,12 @@ S_perl_hash_to_cfish_hash(HV *phash) {
                 if ((key_str[i] & 0x80) == 0x80) { pure_ascii = false; }
             }
             if (pure_ascii) {
-                CFISH_Hash_Store_Str(retval, key_str, key_len, value);
+                CFISH_Hash_Store_Utf8(retval, key_str, key_len, value);
             }
             else {
                 SV *key_sv = HeSVKEY_force(entry);
                 key_str = SvPVutf8(key_sv, key_len);
-                CFISH_Hash_Store_Str(retval, key_str, key_len, value);
+                CFISH_Hash_Store_Utf8(retval, key_str, key_len, value);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/Analyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Analyzer.c b/core/Lucy/Analysis/Analyzer.c
index b620e9e..4683276 100644
--- a/core/Lucy/Analysis/Analyzer.c
+++ b/core/Lucy/Analysis/Analyzer.c
@@ -61,8 +61,8 @@ Analyzer_Split_IMP(Analyzer *self, String *text) {
 Obj*
 Analyzer_Dump_IMP(Analyzer *self) {
     Hash *dump = Hash_new(0);
-    Hash_Store_Str(dump, "_class", 6,
-                   (Obj*)Str_Clone(Obj_Get_Class_Name((Obj*)self)));
+    Hash_Store_Utf8(dump, "_class", 6,
+                    (Obj*)Str_Clone(Obj_Get_Class_Name((Obj*)self)));
     return (Obj*)dump;
 }
 
@@ -71,7 +71,7 @@ Analyzer_Load_IMP(Analyzer *self, Obj *dump) {
     CHY_UNUSED_VAR(self);
     Hash *source = (Hash*)CERTIFY(dump, HASH);
     String *class_name
-        = (String*)CERTIFY(Hash_Fetch_Str(source, "_class", 6), STRING);
+        = (String*)CERTIFY(Hash_Fetch_Utf8(source, "_class", 6), STRING);
     VTable *vtable = VTable_singleton(class_name, NULL);
     Analyzer *loaded = (Analyzer*)VTable_Make_Obj(vtable);
     return (Obj*)loaded;

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/EasyAnalyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/EasyAnalyzer.c b/core/Lucy/Analysis/EasyAnalyzer.c
index f4d0947..136dca9 100644
--- a/core/Lucy/Analysis/EasyAnalyzer.c
+++ b/core/Lucy/Analysis/EasyAnalyzer.c
@@ -78,7 +78,7 @@ EasyAnalyzer_Dump_IMP(EasyAnalyzer *self) {
     EasyAnalyzer_Dump_t super_dump
         = SUPER_METHOD_PTR(EASYANALYZER, LUCY_EasyAnalyzer_Dump);
     Hash *dump = super_dump(self);
-    Hash_Store_Str(dump, "language", 8, (Obj*)Str_Clone(ivars->language));
+    Hash_Store_Utf8(dump, "language", 8, (Obj*)Str_Clone(ivars->language));
     return dump;
 }
 
@@ -89,7 +89,7 @@ EasyAnalyzer_Load_IMP(EasyAnalyzer *self, Obj *dump) {
     EasyAnalyzer *loaded = super_load(self, dump);
     Hash    *source = (Hash*)CERTIFY(dump, HASH);
     String *language
-        = (String*)CERTIFY(Hash_Fetch_Str(source, "language", 8), STRING);
+        = (String*)CERTIFY(Hash_Fetch_Utf8(source, "language", 8), STRING);
     return EasyAnalyzer_init(loaded, language);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/Normalizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Normalizer.c b/core/Lucy/Analysis/Normalizer.c
index 924d966..c022f5f 100644
--- a/core/Lucy/Analysis/Normalizer.c
+++ b/core/Lucy/Analysis/Normalizer.c
@@ -40,17 +40,17 @@ Normalizer_init(Normalizer *self, const String *form, bool case_fold,
     NormalizerIVARS *const ivars = Normalizer_IVARS(self);
 
     if (form == NULL
-        || Str_Equals_Str(form, "NFKC", 4) || Str_Equals_Str(form, "nfkc", 4)
+        || Str_Equals_Utf8(form, "NFKC", 4) || Str_Equals_Utf8(form, "nfkc", 4)
        ) {
         options |= UTF8PROC_COMPOSE | UTF8PROC_COMPAT;
     }
-    else if (Str_Equals_Str(form, "NFC", 3) || Str_Equals_Str(form, "nfc", 3)) {
+    else if (Str_Equals_Utf8(form, "NFC", 3) || Str_Equals_Utf8(form, "nfc", 3)) {
         options |= UTF8PROC_COMPOSE;
     }
-    else if (Str_Equals_Str(form, "NFKD", 4) || Str_Equals_Str(form, "nfkd", 4)) {
+    else if (Str_Equals_Utf8(form, "NFKD", 4) || Str_Equals_Utf8(form, "nfkd", 4)) {
         options |= UTF8PROC_DECOMPOSE | UTF8PROC_COMPAT;
     }
-    else if (Str_Equals_Str(form, "NFD", 3) || Str_Equals_Str(form, "nfd", 3)) {
+    else if (Str_Equals_Utf8(form, "NFD", 3) || Str_Equals_Utf8(form, "nfd", 3)) {
         options |= UTF8PROC_DECOMPOSE;
     }
     else {
@@ -133,13 +133,13 @@ Normalizer_Dump_IMP(Normalizer *self) {
                         Str_new_from_trusted_utf8("NFKD", 4) :
                         Str_new_from_trusted_utf8("NFD", 3);
 
-    Hash_Store_Str(dump, "normalization_form", 18, (Obj*)form);
+    Hash_Store_Utf8(dump, "normalization_form", 18, (Obj*)form);
 
     BoolNum *case_fold = Bool_singleton(options & UTF8PROC_CASEFOLD);
-    Hash_Store_Str(dump, "case_fold", 9, (Obj*)case_fold);
+    Hash_Store_Utf8(dump, "case_fold", 9, (Obj*)case_fold);
 
     BoolNum *strip_accents = Bool_singleton(options & UTF8PROC_STRIPMARK);
-    Hash_Store_Str(dump, "strip_accents", 13, (Obj*)strip_accents);
+    Hash_Store_Utf8(dump, "strip_accents", 13, (Obj*)strip_accents);
 
     return dump;
 }
@@ -151,11 +151,11 @@ Normalizer_Load_IMP(Normalizer *self, Obj *dump) {
     Normalizer *loaded = super_load(self, dump);
     Hash    *source = (Hash*)CERTIFY(dump, HASH);
 
-    Obj *obj = Hash_Fetch_Str(source, "normalization_form", 18);
+    Obj *obj = Hash_Fetch_Utf8(source, "normalization_form", 18);
     String *form = (String*)CERTIFY(obj, STRING);
-    obj = Hash_Fetch_Str(source, "case_fold", 9);
+    obj = Hash_Fetch_Utf8(source, "case_fold", 9);
     bool case_fold = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
-    obj = Hash_Fetch_Str(source, "strip_accents", 13);
+    obj = Hash_Fetch_Utf8(source, "strip_accents", 13);
     bool strip_accents = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
 
     return Normalizer_init(loaded, form, case_fold, strip_accents);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/PolyAnalyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/PolyAnalyzer.c b/core/Lucy/Analysis/PolyAnalyzer.c
index 00f8a4a..59ba1d9 100644
--- a/core/Lucy/Analysis/PolyAnalyzer.c
+++ b/core/Lucy/Analysis/PolyAnalyzer.c
@@ -128,8 +128,8 @@ PolyAnalyzer_Dump_IMP(PolyAnalyzer *self) {
         = SUPER_METHOD_PTR(POLYANALYZER, LUCY_PolyAnalyzer_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
     if (ivars->analyzers) {
-        Hash_Store_Str(dump, "analyzers", 9,
-                       Freezer_dump((Obj*)ivars->analyzers));
+        Hash_Store_Utf8(dump, "analyzers", 9,
+                        Freezer_dump((Obj*)ivars->analyzers));
     }
     return (Obj*)dump;
 }
@@ -141,7 +141,7 @@ PolyAnalyzer_Load_IMP(PolyAnalyzer *self, Obj *dump) {
         = SUPER_METHOD_PTR(POLYANALYZER, LUCY_PolyAnalyzer_Load);
     PolyAnalyzer *loaded = super_load(self, dump);
     VArray *analyzer_dumps
-        = (VArray*)CERTIFY(Hash_Fetch_Str(source, "analyzers", 9), VARRAY);
+        = (VArray*)CERTIFY(Hash_Fetch_Utf8(source, "analyzers", 9), VARRAY);
     VArray *analyzers
         = (VArray*)CERTIFY(Freezer_load((Obj*)analyzer_dumps), VARRAY);
     PolyAnalyzer_init(loaded, NULL, analyzers);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/RegexTokenizer.c b/core/Lucy/Analysis/RegexTokenizer.c
index ee8be64..3b9e6fa 100644
--- a/core/Lucy/Analysis/RegexTokenizer.c
+++ b/core/Lucy/Analysis/RegexTokenizer.c
@@ -35,8 +35,8 @@ RegexTokenizer_Transform_IMP(RegexTokenizer *self, Inversion *inversion) {
 
     while (NULL != (token = Inversion_Next(inversion))) {
         TokenIVARS *const token_ivars = Token_IVARS(token);
-        RegexTokenizer_Tokenize_Str(self, token_ivars->text, token_ivars->len,
-                                    new_inversion);
+        RegexTokenizer_Tokenize_Utf8(self, token_ivars->text, token_ivars->len,
+                                     new_inversion);
     }
 
     return new_inversion;
@@ -45,8 +45,8 @@ RegexTokenizer_Transform_IMP(RegexTokenizer *self, Inversion *inversion) {
 Inversion*
 RegexTokenizer_Transform_Text_IMP(RegexTokenizer *self, String *text) {
     Inversion *new_inversion = Inversion_new(NULL);
-    RegexTokenizer_Tokenize_Str(self, (char*)Str_Get_Ptr8(text),
-                                Str_Get_Size(text), new_inversion);
+    RegexTokenizer_Tokenize_Utf8(self, (char*)Str_Get_Ptr8(text),
+                                 Str_Get_Size(text), new_inversion);
     return new_inversion;
 }
 
@@ -56,7 +56,7 @@ RegexTokenizer_Dump_IMP(RegexTokenizer *self) {
     RegexTokenizer_Dump_t super_dump
         = SUPER_METHOD_PTR(REGEXTOKENIZER, LUCY_RegexTokenizer_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "pattern", 7, (Obj*)Str_Clone(ivars->pattern));
+    Hash_Store_Utf8(dump, "pattern", 7, (Obj*)Str_Clone(ivars->pattern));
     return (Obj*)dump;
 }
 
@@ -67,7 +67,7 @@ RegexTokenizer_Load_IMP(RegexTokenizer *self, Obj *dump) {
         = SUPER_METHOD_PTR(REGEXTOKENIZER, LUCY_RegexTokenizer_Load);
     RegexTokenizer *loaded = super_load(self, dump);
     String *pattern 
-        = (String*)CERTIFY(Hash_Fetch_Str(source, "pattern", 7), STRING);
+        = (String*)CERTIFY(Hash_Fetch_Utf8(source, "pattern", 7), STRING);
     return RegexTokenizer_init(loaded, pattern);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/RegexTokenizer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/RegexTokenizer.cfh b/core/Lucy/Analysis/RegexTokenizer.cfh
index fb0fb56..a4bde3c 100644
--- a/core/Lucy/Analysis/RegexTokenizer.cfh
+++ b/core/Lucy/Analysis/RegexTokenizer.cfh
@@ -81,8 +81,8 @@ public class Lucy::Analysis::RegexTokenizer
      * supplied Inversion.
      */
     void
-    Tokenize_Str(RegexTokenizer *self, const char *text, size_t len,
-                 Inversion *inversion);
+    Tokenize_Utf8(RegexTokenizer *self, const char *text, size_t len,
+                  Inversion *inversion);
 
     /** Set the compiled regular expression for matching a token.  Also sets
      * <code>pattern</code> as a side effect.

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/SnowballStemmer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStemmer.c b/core/Lucy/Analysis/SnowballStemmer.c
index 3df82a4..955d2fc 100644
--- a/core/Lucy/Analysis/SnowballStemmer.c
+++ b/core/Lucy/Analysis/SnowballStemmer.c
@@ -90,7 +90,7 @@ SnowStemmer_Dump_IMP(SnowballStemmer *self) {
     SnowStemmer_Dump_t super_dump
         = SUPER_METHOD_PTR(SNOWBALLSTEMMER, LUCY_SnowStemmer_Dump);
     Hash *dump = super_dump(self);
-    Hash_Store_Str(dump, "language", 8, (Obj*)Str_Clone(ivars->language));
+    Hash_Store_Utf8(dump, "language", 8, (Obj*)Str_Clone(ivars->language));
     return dump;
 }
 
@@ -101,7 +101,7 @@ SnowStemmer_Load_IMP(SnowballStemmer *self, Obj *dump) {
     SnowballStemmer *loaded = super_load(self, dump);
     Hash    *source = (Hash*)CERTIFY(dump, HASH);
     String *language 
-        = (String*)CERTIFY(Hash_Fetch_Str(source, "language", 8), STRING);
+        = (String*)CERTIFY(Hash_Fetch_Utf8(source, "language", 8), STRING);
     return SnowStemmer_init(loaded, language);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/SnowballStopFilter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStopFilter.c b/core/Lucy/Analysis/SnowballStopFilter.c
index 323c108..4aa9d16 100644
--- a/core/Lucy/Analysis/SnowballStopFilter.c
+++ b/core/Lucy/Analysis/SnowballStopFilter.c
@@ -69,7 +69,7 @@ SnowStop_Transform_IMP(SnowballStopFilter *self, Inversion *inversion) {
 
     while (NULL != (token = Inversion_Next(inversion))) {
         TokenIVARS *const token_ivars = Token_IVARS(token);
-        if (!Hash_Fetch_Str(stoplist, token_ivars->text, token_ivars->len)) {
+        if (!Hash_Fetch_Utf8(stoplist, token_ivars->text, token_ivars->len)) {
             Inversion_Append(new_inversion, (Token*)INCREF(token));
         }
     }
@@ -97,8 +97,8 @@ SnowStop_Dump_IMP(SnowballStopFilter *self) {
         = SUPER_METHOD_PTR(SNOWBALLSTOPFILTER, LUCY_SnowStop_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
     if (ivars->stoplist) {
-        Hash_Store_Str(dump, "stoplist", 8,
-                       Freezer_dump((Obj*)ivars->stoplist));
+        Hash_Store_Utf8(dump, "stoplist", 8,
+                        Freezer_dump((Obj*)ivars->stoplist));
     }
     return (Obj*)dump;
 }
@@ -109,7 +109,7 @@ SnowStop_Load_IMP(SnowballStopFilter *self, Obj *dump) {
     SnowStop_Load_t super_load
         = SUPER_METHOD_PTR(SNOWBALLSTOPFILTER, LUCY_SnowStop_Load);
     SnowballStopFilter *loaded = (SnowballStopFilter*)super_load(self, dump);
-    Obj *stoplist = Hash_Fetch_Str(source, "stoplist", 8);
+    Obj *stoplist = Hash_Fetch_Utf8(source, "stoplist", 8);
     if (stoplist) {
         SnowStop_IVARS(loaded)->stoplist
             = (Hash*)CERTIFY(Freezer_load(stoplist), HASH);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/StandardTokenizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/StandardTokenizer.c b/core/Lucy/Analysis/StandardTokenizer.c
index eaa68f5..8db94ec 100644
--- a/core/Lucy/Analysis/StandardTokenizer.c
+++ b/core/Lucy/Analysis/StandardTokenizer.c
@@ -87,8 +87,8 @@ StandardTokenizer_Transform_IMP(StandardTokenizer *self, Inversion *inversion) {
 
     while (NULL != (token = Inversion_Next(inversion))) {
         TokenIVARS *const token_ivars = Token_IVARS(token);
-        StandardTokenizer_Tokenize_Str(self, token_ivars->text,
-                                       token_ivars->len, new_inversion);
+        StandardTokenizer_Tokenize_Utf8(self, token_ivars->text,
+                                        token_ivars->len, new_inversion);
     }
 
     return new_inversion;
@@ -97,14 +97,14 @@ StandardTokenizer_Transform_IMP(StandardTokenizer *self, Inversion *inversion) {
 Inversion*
 StandardTokenizer_Transform_Text_IMP(StandardTokenizer *self, String *text) {
     Inversion *new_inversion = Inversion_new(NULL);
-    StandardTokenizer_Tokenize_Str(self, (char*)Str_Get_Ptr8(text),
-                                   Str_Get_Size(text), new_inversion);
+    StandardTokenizer_Tokenize_Utf8(self, (char*)Str_Get_Ptr8(text),
+                                    Str_Get_Size(text), new_inversion);
     return new_inversion;
 }
 
 void
-StandardTokenizer_Tokenize_Str_IMP(StandardTokenizer *self, const char *text,
-                                   size_t len, Inversion *inversion) {
+StandardTokenizer_Tokenize_Utf8_IMP(StandardTokenizer *self, const char *text,
+                                    size_t len, Inversion *inversion) {
     UNUSED_VAR(self);
     if ((len >= 1 && (uint8_t)text[len - 1] >= 0xC0)
         ||  (len >= 2 && (uint8_t)text[len - 2] >= 0xE0)

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Analysis/StandardTokenizer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/StandardTokenizer.cfh b/core/Lucy/Analysis/StandardTokenizer.cfh
index 6e4041a..2bac5c7 100644
--- a/core/Lucy/Analysis/StandardTokenizer.cfh
+++ b/core/Lucy/Analysis/StandardTokenizer.cfh
@@ -47,8 +47,8 @@ public class Lucy::Analysis::StandardTokenizer
      * supplied Inversion.
      */
     void
-    Tokenize_Str(StandardTokenizer *self, const char *text, size_t len,
-                 Inversion *inversion);
+    Tokenize_Utf8(StandardTokenizer *self, const char *text, size_t len,
+                  Inversion *inversion);
 
     public bool
     Equals(StandardTokenizer *self, Obj *other);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Document/HitDoc.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Document/HitDoc.c b/core/Lucy/Document/HitDoc.c
index 83cfdf9..2abcbbc 100644
--- a/core/Lucy/Document/HitDoc.c
+++ b/core/Lucy/Document/HitDoc.c
@@ -70,7 +70,7 @@ HitDoc_Dump_IMP(HitDoc *self) {
     HitDoc_Dump_t super_dump
         = SUPER_METHOD_PTR(HITDOC, LUCY_HitDoc_Dump);
     Hash *dump = super_dump(self);
-    Hash_Store_Str(dump, "score", 5, (Obj*)Str_newf("%f64", ivars->score));
+    Hash_Store_Utf8(dump, "score", 5, (Obj*)Str_newf("%f64", ivars->score));
     return dump;
 }
 
@@ -81,7 +81,7 @@ HitDoc_Load_IMP(HitDoc *self, Obj *dump) {
         = SUPER_METHOD_PTR(HITDOC, LUCY_HitDoc_Load);
     HitDoc *loaded = super_load(self, dump);
     HitDocIVARS *const loaded_ivars = HitDoc_IVARS(loaded);
-    Obj *score = CERTIFY(Hash_Fetch_Str(source, "score", 5), OBJ);
+    Obj *score = CERTIFY(Hash_Fetch_Utf8(source, "score", 5), OBJ);
     loaded_ivars->score = (float)Obj_To_F64(score);
     return loaded;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Highlight/Highlighter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Highlight/Highlighter.c b/core/Lucy/Highlight/Highlighter.c
index 35585a1..2d55639 100644
--- a/core/Lucy/Highlight/Highlighter.c
+++ b/core/Lucy/Highlight/Highlighter.c
@@ -614,16 +614,16 @@ S_encode_entities(String *text, CharBuf *buf) {
             CB_catf(buf, "&#%u32;", code_point);
         }
         else if (code_point == '<') {
-            CB_Cat_Trusted_UTF8(buf, "&lt;", 4);
+            CB_Cat_Trusted_Utf8(buf, "&lt;", 4);
         }
         else if (code_point == '>') {
-            CB_Cat_Trusted_UTF8(buf, "&gt;", 4);
+            CB_Cat_Trusted_Utf8(buf, "&gt;", 4);
         }
         else if (code_point == '&') {
-            CB_Cat_Trusted_UTF8(buf, "&amp;", 5);
+            CB_Cat_Trusted_Utf8(buf, "&amp;", 5);
         }
         else if (code_point == '"') {
-            CB_Cat_Trusted_UTF8(buf, "&quot;", 6);
+            CB_Cat_Trusted_Utf8(buf, "&quot;", 6);
         }
         else {
             CB_Cat_Char(buf, code_point);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/BackgroundMerger.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/BackgroundMerger.c b/core/Lucy/Index/BackgroundMerger.c
index 45bd39d..547a5f9 100644
--- a/core/Lucy/Index/BackgroundMerger.c
+++ b/core/Lucy/Index/BackgroundMerger.c
@@ -413,7 +413,7 @@ BGMerger_Prepare_Commit_IMP(BackgroundMerger *self) {
         // Write temporary snapshot file.
         DECREF(ivars->snapfile);
         String *snapfile = IxManager_Make_Snapshot_Filename(ivars->manager);
-        ivars->snapfile = Str_Cat_Trusted_UTF8(snapfile, ".temp", 5);
+        ivars->snapfile = Str_Cat_Trusted_Utf8(snapfile, ".temp", 5);
         DECREF(snapfile);
         Folder_Delete(folder, ivars->snapfile);
         Snapshot_Write_File(snapshot, folder, ivars->snapfile);
@@ -444,7 +444,7 @@ BGMerger_Prepare_Commit_IMP(BackgroundMerger *self) {
             VArray *files = Snapshot_List(latest_snapshot);
             for (uint32_t i = 0, max = VA_Get_Size(files); i < max; i++) {
                 String *file = (String*)VA_Fetch(files, i);
-                if (Str_Starts_With_Str(file, "seg_", 4)) {
+                if (Str_Starts_With_Utf8(file, "seg_", 4)) {
                     int64_t gen = (int64_t)IxFileNames_extract_gen(file);
                     if (gen > ivars->cutoff) {
                         Snapshot_Add_Entry(ivars->snapshot, file);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/DataWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/DataWriter.c b/core/Lucy/Index/DataWriter.c
index 747dc89..5cc299a 100644
--- a/core/Lucy/Index/DataWriter.c
+++ b/core/Lucy/Index/DataWriter.c
@@ -91,8 +91,8 @@ DataWriter_Merge_Segment_IMP(DataWriter *self, SegReader *reader,
 Hash*
 DataWriter_Metadata_IMP(DataWriter *self) {
     Hash *metadata = Hash_new(0);
-    Hash_Store_Str(metadata, "format", 6,
-                   (Obj*)Str_newf("%i32", DataWriter_Format(self)));
+    Hash_Store_Utf8(metadata, "format", 6,
+                    (Obj*)Str_newf("%i32", DataWriter_Format(self)));
     return metadata;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/DeletionsReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/DeletionsReader.c b/core/Lucy/Index/DeletionsReader.c
index 3e21ada..bb5e49d 100644
--- a/core/Lucy/Index/DeletionsReader.c
+++ b/core/Lucy/Index/DeletionsReader.c
@@ -168,19 +168,19 @@ DefDelReader_Read_Deletions_IMP(DefaultDeletionsReader *self) {
     for (int32_t i = VA_Get_Size(segments) - 1; i >= 0; i--) {
         Segment *other_seg = (Segment*)VA_Fetch(segments, i);
         Hash *metadata
-            = (Hash*)Seg_Fetch_Metadata_Str(other_seg, "deletions", 9);
+            = (Hash*)Seg_Fetch_Metadata_Utf8(other_seg, "deletions", 9);
         if (metadata) {
             Hash *files = (Hash*)CERTIFY(
-                              Hash_Fetch_Str(metadata, "files", 5), HASH);
+                              Hash_Fetch_Utf8(metadata, "files", 5), HASH);
             Hash *seg_files_data
                 = (Hash*)Hash_Fetch(files, (Obj*)my_seg_name);
             if (seg_files_data) {
                 Obj *count = (Obj*)CERTIFY(
-                                 Hash_Fetch_Str(seg_files_data, "count", 5),
+                                 Hash_Fetch_Utf8(seg_files_data, "count", 5),
                                  OBJ);
                 del_count = (int32_t)Obj_To_I64(count);
                 del_file  = (String*)CERTIFY(
-                                Hash_Fetch_Str(seg_files_data, "filename", 8),
+                                Hash_Fetch_Utf8(seg_files_data, "filename", 8),
                                 STRING);
                 break;
             }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/DeletionsWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/DeletionsWriter.c b/core/Lucy/Index/DeletionsWriter.c
index 2bb0f02..829a04c 100644
--- a/core/Lucy/Index/DeletionsWriter.c
+++ b/core/Lucy/Index/DeletionsWriter.c
@@ -168,8 +168,8 @@ DefDelWriter_Finish_IMP(DefaultDeletionsWriter *self) {
         }
     }
 
-    Seg_Store_Metadata_Str(ivars->segment, "deletions", 9,
-                           (Obj*)DefDelWriter_Metadata(self));
+    Seg_Store_Metadata_Utf8(ivars->segment, "deletions", 9,
+                            (Obj*)DefDelWriter_Metadata(self));
 }
 
 Hash*
@@ -187,14 +187,14 @@ DefDelWriter_Metadata_IMP(DefaultDeletionsWriter *self) {
             BitVector *deldocs   = (BitVector*)VA_Fetch(ivars->bit_vecs, i);
             Segment   *segment   = SegReader_Get_Segment(seg_reader);
             Hash      *mini_meta = Hash_new(2);
-            Hash_Store_Str(mini_meta, "count", 5,
-                           (Obj*)Str_newf("%u32", (uint32_t)BitVec_Count(deldocs)));
-            Hash_Store_Str(mini_meta, "filename", 8,
-                           (Obj*)S_del_filename(self, seg_reader));
+            Hash_Store_Utf8(mini_meta, "count", 5,
+                            (Obj*)Str_newf("%u32", (uint32_t)BitVec_Count(deldocs)));
+            Hash_Store_Utf8(mini_meta, "filename", 8,
+                            (Obj*)S_del_filename(self, seg_reader));
             Hash_Store(files, (Obj*)Seg_Get_Name(segment), (Obj*)mini_meta);
         }
     }
-    Hash_Store_Str(metadata, "files", 5, (Obj*)files);
+    Hash_Store_Utf8(metadata, "files", 5, (Obj*)files);
 
     return metadata;
 }
@@ -344,11 +344,11 @@ DefDelWriter_Merge_Segment_IMP(DefaultDeletionsWriter *self,
     DefaultDeletionsWriterIVARS *const ivars = DefDelWriter_IVARS(self);
     UNUSED_VAR(doc_map);
     Segment *segment = SegReader_Get_Segment(reader);
-    Hash *del_meta = (Hash*)Seg_Fetch_Metadata_Str(segment, "deletions", 9);
+    Hash *del_meta = (Hash*)Seg_Fetch_Metadata_Utf8(segment, "deletions", 9);
 
     if (del_meta) {
         VArray *seg_readers = ivars->seg_readers;
-        Hash   *files = (Hash*)Hash_Fetch_Str(del_meta, "files", 5);
+        Hash   *files = (Hash*)Hash_Fetch_Utf8(del_meta, "files", 5);
         if (files) {
             String *seg;
             Hash *mini_meta;
@@ -370,7 +370,7 @@ DefDelWriter_Merge_Segment_IMP(DefaultDeletionsWriter *self,
                          * merge away the most recent deletions file
                          * pointing at this target segment -- so force a
                          * new file to be written out. */
-                        int32_t count = (int32_t)Obj_To_I64(Hash_Fetch_Str(mini_meta, "count", 5));
+                        int32_t count = (int32_t)Obj_To_I64(Hash_Fetch_Utf8(mini_meta, "count", 5));
                         DeletionsReader *del_reader
                             = (DeletionsReader*)SegReader_Obtain(
                                   candidate, VTable_Get_Name(DELETIONSREADER));

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/DocReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/DocReader.c b/core/Lucy/Index/DocReader.c
index 483af50..30f8dba 100644
--- a/core/Lucy/Index/DocReader.c
+++ b/core/Lucy/Index/DocReader.c
@@ -139,13 +139,13 @@ DefDocReader_init(DefaultDocReader *self, Schema *schema, Folder *folder,
                    seg_tick);
     DefaultDocReaderIVARS *const ivars = DefDocReader_IVARS(self);
     segment = DefDocReader_Get_Segment(self);
-    metadata = (Hash*)Seg_Fetch_Metadata_Str(segment, "documents", 9);
+    metadata = (Hash*)Seg_Fetch_Metadata_Utf8(segment, "documents", 9);
 
     if (metadata) {
         String *seg_name  = Seg_Get_Name(segment);
         String *ix_file   = Str_newf("%o/documents.ix", seg_name);
         String *dat_file  = Str_newf("%o/documents.dat", seg_name);
-        Obj     *format   = Hash_Fetch_Str(metadata, "format", 6);
+        Obj     *format   = Hash_Fetch_Utf8(metadata, "format", 6);
 
         // Check format.
         if (!format) { THROW(ERR, "Missing 'format' var"); }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/DocVector.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/DocVector.c b/core/Lucy/Index/DocVector.c
index 5821f90..585c955 100644
--- a/core/Lucy/Index/DocVector.c
+++ b/core/Lucy/Index/DocVector.c
@@ -132,7 +132,7 @@ S_extract_tv_cache(ByteBuf *field_buf) {
 
         // Decompress the term text.
         CB_Set_Size(text_buf, overlap);
-        CB_Cat_Trusted_UTF8(text_buf, tv_string, len);
+        CB_Cat_Trusted_Utf8(text_buf, tv_string, len);
         tv_string += len;
 
         // Get positions & offsets string.

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/DocWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/DocWriter.c b/core/Lucy/Index/DocWriter.c
index cb8c9e3..16f86ef 100644
--- a/core/Lucy/Index/DocWriter.c
+++ b/core/Lucy/Index/DocWriter.c
@@ -208,8 +208,8 @@ DocWriter_Finish_IMP(DocWriter *self) {
         // Close down output streams.
         OutStream_Close(ivars->dat_out);
         OutStream_Close(ivars->ix_out);
-        Seg_Store_Metadata_Str(ivars->segment, "documents", 9,
-                               (Obj*)DocWriter_Metadata(self));
+        Seg_Store_Metadata_Utf8(ivars->segment, "documents", 9,
+                                (Obj*)DocWriter_Metadata(self));
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/FilePurger.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/FilePurger.c b/core/Lucy/Index/FilePurger.c
index 46957a9..d61482e 100644
--- a/core/Lucy/Index/FilePurger.c
+++ b/core/Lucy/Index/FilePurger.c
@@ -60,7 +60,7 @@ FilePurger_init(FilePurger *self, Folder *folder, Snapshot *snapshot,
 
     // Don't allow the locks directory to be zapped.
     ivars->disallowed = Hash_new(0);
-    Hash_Store_Str(ivars->disallowed, "locks", 5, (Obj*)CFISH_TRUE);
+    Hash_Store_Utf8(ivars->disallowed, "locks", 5, (Obj*)CFISH_TRUE);
 
     return self;
 }
@@ -149,7 +149,7 @@ S_zap_dead_merge(FilePurger *self, Hash *candidates) {
     if (!Lock_Is_Locked(merge_lock)) {
         Hash *merge_data = IxManager_Read_Merge_Data(manager);
         Obj  *cutoff = merge_data
-                       ? Hash_Fetch_Str(merge_data, "cutoff", 6)
+                       ? Hash_Fetch_Utf8(merge_data, "cutoff", 6)
                        : NULL;
 
         if (cutoff) {
@@ -209,8 +209,8 @@ S_discover_unused(FilePurger *self, VArray **purgables_ptr,
     Hash *candidates = Hash_new(64);
     while (DH_Next(dh)) {
         String *entry = DH_Get_Entry(dh);
-        if (Str_Starts_With_Str(entry, "snapshot_", 9)
-            && Str_Ends_With_Str(entry, ".json", 5)
+        if (Str_Starts_With_Utf8(entry, "snapshot_", 9)
+            && Str_Ends_With_Utf8(entry, ".json", 5)
             && (!snapfile || !Str_Equals(entry, (Obj*)snapfile))
         ) {
             Snapshot *snapshot

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/HighlightReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/HighlightReader.c b/core/Lucy/Index/HighlightReader.c
index f24c346..af2c269 100644
--- a/core/Lucy/Index/HighlightReader.c
+++ b/core/Lucy/Index/HighlightReader.c
@@ -119,14 +119,14 @@ DefHLReader_init(DefaultHighlightReader *self, Schema *schema,
                   segments, seg_tick);
     DefaultHighlightReaderIVARS *const ivars = DefHLReader_IVARS(self);
     Segment *segment    = DefHLReader_Get_Segment(self);
-    Hash *metadata      = (Hash*)Seg_Fetch_Metadata_Str(segment, "highlight", 9);
+    Hash *metadata      = (Hash*)Seg_Fetch_Metadata_Utf8(segment, "highlight", 9);
     if (!metadata) {
-        metadata = (Hash*)Seg_Fetch_Metadata_Str(segment, "term_vectors", 12);
+        metadata = (Hash*)Seg_Fetch_Metadata_Utf8(segment, "term_vectors", 12);
     }
 
     // Check format.
     if (metadata) {
-        Obj *format = Hash_Fetch_Str(metadata, "format", 6);
+        Obj *format = Hash_Fetch_Utf8(metadata, "format", 6);
         if (!format) { THROW(ERR, "Missing 'format' var"); }
         else {
             if (Obj_To_I64(format) != HLWriter_current_file_format) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/HighlightWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/HighlightWriter.c b/core/Lucy/Index/HighlightWriter.c
index 0d03233..e259a61 100644
--- a/core/Lucy/Index/HighlightWriter.c
+++ b/core/Lucy/Index/HighlightWriter.c
@@ -259,8 +259,8 @@ HLWriter_Finish_IMP(HighlightWriter *self) {
         // Close down the output streams.
         OutStream_Close(ivars->dat_out);
         OutStream_Close(ivars->ix_out);
-        Seg_Store_Metadata_Str(ivars->segment, "highlight", 9,
-                               (Obj*)HLWriter_Metadata(self));
+        Seg_Store_Metadata_Utf8(ivars->segment, "highlight", 9,
+                                (Obj*)HLWriter_Metadata(self));
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/IndexManager.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/IndexManager.c b/core/Lucy/Index/IndexManager.c
index b1b29b4..b22e993 100644
--- a/core/Lucy/Index/IndexManager.c
+++ b/core/Lucy/Index/IndexManager.c
@@ -91,8 +91,8 @@ IxManager_Make_Snapshot_Filename_IMP(IndexManager *self) {
     if (!dh) { RETHROW(INCREF(Err_get_error())); }
     while (DH_Next(dh)) {
         String *entry = DH_Get_Entry(dh);
-        if (Str_Starts_With_Str(entry, "snapshot_", 9)
-            && Str_Ends_With_Str(entry, ".json", 5)
+        if (Str_Starts_With_Utf8(entry, "snapshot_", 9)
+            && Str_Ends_With_Utf8(entry, ".json", 5)
            ) {
             uint64_t gen = IxFileNames_extract_gen(entry);
             if (gen > max_gen) { max_gen = gen; }
@@ -266,7 +266,7 @@ IxManager_Write_Merge_Data_IMP(IndexManager *self, int64_t cutoff) {
     StackString *merge_json = SSTR_WRAP_STR("merge.json", 10);
     Hash *data = Hash_new(1);
     bool success;
-    Hash_Store_Str(data, "cutoff", 6, (Obj*)Str_newf("%i64", cutoff));
+    Hash_Store_Utf8(data, "cutoff", 6, (Obj*)Str_newf("%i64", cutoff));
     success = Json_spew_json((Obj*)data, ivars->folder, (String*)merge_json);
     DECREF(data);
     if (!success) {
@@ -306,8 +306,8 @@ IxManager_Make_Snapshot_Read_Lock_IMP(IndexManager *self,
                                       const String *filename) {
     LockFactory *lock_factory = S_obtain_lock_factory(self);
 
-    if (!Str_Starts_With_Str(filename, "snapshot_", 9)
-        || !Str_Ends_With_Str(filename, ".json", 5)
+    if (!Str_Starts_With_Utf8(filename, "snapshot_", 9)
+        || !Str_Ends_With_Utf8(filename, ".json", 5)
        ) {
         THROW(ERR, "Not a snapshot filename: %o", filename);
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/Indexer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Indexer.c b/core/Lucy/Index/Indexer.c
index 815e7b4..7ef8ae2 100644
--- a/core/Lucy/Index/Indexer.c
+++ b/core/Lucy/Index/Indexer.c
@@ -176,7 +176,7 @@ Indexer_init(Indexer *self, Schema *schema, Obj *index,
         // way.
         Hash *merge_data = IxManager_Read_Merge_Data(ivars->manager);
         Obj *cutoff_obj = merge_data
-                          ? Hash_Fetch_Str(merge_data, "cutoff", 6)
+                          ? Hash_Fetch_Utf8(merge_data, "cutoff", 6)
                           : NULL;
         if (!cutoff_obj) {
             DECREF(merge_lock);
@@ -384,8 +384,8 @@ S_find_schema_file(Snapshot *snapshot) {
     String *retval = NULL;
     for (uint32_t i = 0, max = VA_Get_Size(files); i < max; i++) {
         String *file = (String*)VA_Fetch(files, i);
-        if (Str_Starts_With_Str(file, "schema_", 7)
-            && Str_Ends_With_Str(file, ".json", 5)
+        if (Str_Starts_With_Utf8(file, "schema_", 7)
+            && Str_Ends_With_Utf8(file, ".json", 5)
            ) {
             retval = file;
             break;
@@ -412,7 +412,7 @@ S_maybe_merge(Indexer *self, VArray *seg_readers) {
         // If something else holds the merge lock, don't interfere.
         Hash *merge_data = IxManager_Read_Merge_Data(ivars->manager);
         if (merge_data) {
-            Obj *cutoff_obj = Hash_Fetch_Str(merge_data, "cutoff", 6);
+            Obj *cutoff_obj = Hash_Fetch_Utf8(merge_data, "cutoff", 6);
             if (cutoff_obj) {
                 cutoff = Obj_To_I64(cutoff_obj);
             }
@@ -508,7 +508,7 @@ Indexer_Prepare_Commit_IMP(Indexer *self) {
         // Derive snapshot and schema file names.
         DECREF(ivars->snapfile);
         String *snapfile = IxManager_Make_Snapshot_Filename(ivars->manager);
-        ivars->snapfile = Str_Cat_Trusted_UTF8(snapfile, ".temp", 5);
+        ivars->snapfile = Str_Cat_Trusted_Utf8(snapfile, ".temp", 5);
         DECREF(snapfile);
         uint64_t schema_gen = IxFileNames_extract_gen(ivars->snapfile);
         char base36[StrHelp_MAX_BASE36_BYTES];

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/LexiconWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/LexiconWriter.c b/core/Lucy/Index/LexiconWriter.c
index 9ffd853..5189c49 100644
--- a/core/Lucy/Index/LexiconWriter.c
+++ b/core/Lucy/Index/LexiconWriter.c
@@ -230,8 +230,8 @@ LexWriter_Finish_IMP(LexiconWriter *self) {
     }
 
     // Store metadata.
-    Seg_Store_Metadata_Str(ivars->segment, "lexicon", 7,
-                           (Obj*)LexWriter_Metadata(self));
+    Seg_Store_Metadata_Utf8(ivars->segment, "lexicon", 7,
+                            (Obj*)LexWriter_Metadata(self));
 }
 
 Hash*
@@ -246,13 +246,13 @@ LexWriter_Metadata_IMP(LexiconWriter *self) {
 
     // Placeholders.
     if (Hash_Get_Size(counts) == 0) {
-        Hash_Store_Str(counts, "none", 4, (Obj*)Str_newf("%i32", (int32_t)0));
-        Hash_Store_Str(ix_counts, "none", 4,
-                       (Obj*)Str_newf("%i32", (int32_t)0));
+        Hash_Store_Utf8(counts, "none", 4, (Obj*)Str_newf("%i32", (int32_t)0));
+        Hash_Store_Utf8(ix_counts, "none", 4,
+                        (Obj*)Str_newf("%i32", (int32_t)0));
     }
 
-    Hash_Store_Str(metadata, "counts", 6, (Obj*)counts);
-    Hash_Store_Str(metadata, "index_counts", 12, (Obj*)ix_counts);
+    Hash_Store_Utf8(metadata, "counts", 6, (Obj*)counts);
+    Hash_Store_Utf8(metadata, "index_counts", 12, (Obj*)ix_counts);
 
     return metadata;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/PolyReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/PolyReader.c b/core/Lucy/Index/PolyReader.c
index e63a639..0446bcb 100644
--- a/core/Lucy/Index/PolyReader.c
+++ b/core/Lucy/Index/PolyReader.c
@@ -237,8 +237,8 @@ S_try_open_elements(void *context) {
         if (Seg_valid_seg_name(entry)) {
             num_segs++;
         }
-        else if (Str_Starts_With_Str(entry, "schema_", 7)
-                 && Str_Ends_With_Str(entry, ".json", 5)
+        else if (Str_Starts_With_Utf8(entry, "schema_", 7)
+                 && Str_Ends_With_Utf8(entry, ".json", 5)
                 ) {
             uint64_t gen = IxFileNames_extract_gen(entry);
             if (gen > latest_schema_gen) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/PostingListReader.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/PostingListReader.c b/core/Lucy/Index/PostingListReader.c
index 02ae03d..f643917 100644
--- a/core/Lucy/Index/PostingListReader.c
+++ b/core/Lucy/Index/PostingListReader.c
@@ -71,13 +71,13 @@ DefPListReader_init(DefaultPostingListReader *self, Schema *schema,
     ivars->lex_reader = (LexiconReader*)INCREF(lex_reader);
 
     // Check format.
-    Hash *my_meta = (Hash*)Seg_Fetch_Metadata_Str(segment, "postings", 8);
+    Hash *my_meta = (Hash*)Seg_Fetch_Metadata_Utf8(segment, "postings", 8);
     if (!my_meta) {
-        my_meta = (Hash*)Seg_Fetch_Metadata_Str(segment, "posting_list", 12);
+        my_meta = (Hash*)Seg_Fetch_Metadata_Utf8(segment, "posting_list", 12);
     }
 
     if (my_meta) {
-        Obj *format = Hash_Fetch_Str(my_meta, "format", 6);
+        Obj *format = Hash_Fetch_Utf8(my_meta, "format", 6);
         if (!format) { THROW(ERR, "Missing 'format' var"); }
         else {
             if (Obj_To_I64(format) != PListWriter_current_file_format) {

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/PostingListWriter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/PostingListWriter.c b/core/Lucy/Index/PostingListWriter.c
index 0245413..b398bc2 100644
--- a/core/Lucy/Index/PostingListWriter.c
+++ b/core/Lucy/Index/PostingListWriter.c
@@ -243,8 +243,8 @@ PListWriter_Finish_IMP(PostingListWriter *self) {
     }
 
     // Store metadata.
-    Seg_Store_Metadata_Str(ivars->segment, "postings", 8,
-                           (Obj*)PListWriter_Metadata(self));
+    Seg_Store_Metadata_Utf8(ivars->segment, "postings", 8,
+                            (Obj*)PListWriter_Metadata(self));
 
     // Close down and clean up.
     OutStream_Close(ivars->skip_out);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/SegLexicon.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/SegLexicon.c b/core/Lucy/Index/SegLexicon.c
index 19c6e7b..dd5931f 100644
--- a/core/Lucy/Index/SegLexicon.c
+++ b/core/Lucy/Index/SegLexicon.c
@@ -47,11 +47,11 @@ SegLexicon*
 SegLex_init(SegLexicon *self, Schema *schema, Folder *folder,
             Segment *segment, const String *field) {
     Hash *metadata = (Hash*)CERTIFY(
-                         Seg_Fetch_Metadata_Str(segment, "lexicon", 7),
+                         Seg_Fetch_Metadata_Utf8(segment, "lexicon", 7),
                          HASH);
     Architecture *arch      = Schema_Get_Architecture(schema);
-    Hash         *counts    = (Hash*)Hash_Fetch_Str(metadata, "counts", 6);
-    Obj          *format    = Hash_Fetch_Str(metadata, "format", 6);
+    Hash         *counts    = (Hash*)Hash_Fetch_Utf8(metadata, "counts", 6);
+    Obj          *format    = Hash_Fetch_Utf8(metadata, "format", 6);
     String       *seg_name  = Seg_Get_Name(segment);
     int32_t       field_num = Seg_Field_Num(segment, field);
     FieldType    *type      = Schema_Fetch_Type(schema, field);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/Segment.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Segment.c b/core/Lucy/Index/Segment.c
index d375e98..21a3f66 100644
--- a/core/Lucy/Index/Segment.c
+++ b/core/Lucy/Index/Segment.c
@@ -65,7 +65,7 @@ Seg_num_to_name(int64_t number) {
 
 bool
 Seg_valid_seg_name(const String *name) {
-    if (Str_Starts_With_Str(name, "seg_", 4)) {
+    if (Str_Starts_With_Utf8(name, "seg_", 4)) {
         StringIterator *iter = Str_Top(name);
         StrIter_Advance(iter, 4);
         uint32_t code_point;
@@ -107,17 +107,17 @@ Seg_Read_File_IMP(Segment *self, Folder *folder) {
     DECREF(ivars->metadata);
     ivars->metadata = metadata;
     my_metadata
-        = (Hash*)CERTIFY(Hash_Fetch_Str(ivars->metadata, "segmeta", 7), HASH);
+        = (Hash*)CERTIFY(Hash_Fetch_Utf8(ivars->metadata, "segmeta", 7), HASH);
 
     // Assign.
-    Obj *count = Hash_Fetch_Str(my_metadata, "count", 5);
-    if (!count) { count = Hash_Fetch_Str(my_metadata, "doc_count", 9); }
+    Obj *count = Hash_Fetch_Utf8(my_metadata, "count", 5);
+    if (!count) { count = Hash_Fetch_Utf8(my_metadata, "doc_count", 9); }
     if (!count) { THROW(ERR, "Missing 'count'"); }
     else { ivars->count = Obj_To_I64(count); }
 
     // Get list of field nums.
-    VArray *source_by_num = (VArray*)Hash_Fetch_Str(my_metadata,
-                                                    "field_names", 11);
+    VArray *source_by_num = (VArray*)Hash_Fetch_Utf8(my_metadata,
+                                                     "field_names", 11);
     uint32_t num_fields = source_by_num ? VA_Get_Size(source_by_num) : 0;
     if (source_by_num == NULL) {
         THROW(ERR, "Failed to extract 'field_names' from metadata");
@@ -144,12 +144,12 @@ Seg_Write_File_IMP(Segment *self, Folder *folder) {
     Hash *my_metadata = Hash_new(16);
 
     // Store metadata specific to this Segment object.
-    Hash_Store_Str(my_metadata, "count", 5,
-                   (Obj*)Str_newf("%i64", ivars->count));
-    Hash_Store_Str(my_metadata, "name", 4, (Obj*)Str_Clone(ivars->name));
-    Hash_Store_Str(my_metadata, "field_names", 11, INCREF(ivars->by_num));
-    Hash_Store_Str(my_metadata, "format", 6, (Obj*)Str_newf("%i32", 1));
-    Hash_Store_Str(ivars->metadata, "segmeta", 7, (Obj*)my_metadata);
+    Hash_Store_Utf8(my_metadata, "count", 5,
+                    (Obj*)Str_newf("%i64", ivars->count));
+    Hash_Store_Utf8(my_metadata, "name", 4, (Obj*)Str_Clone(ivars->name));
+    Hash_Store_Utf8(my_metadata, "field_names", 11, INCREF(ivars->by_num));
+    Hash_Store_Utf8(my_metadata, "format", 6, (Obj*)Str_newf("%i32", 1));
+    Hash_Store_Utf8(ivars->metadata, "segmeta", 7, (Obj*)my_metadata);
 
     String *filename = Str_newf("%o/segmeta.json", ivars->name);
     bool result = Json_spew_json((Obj*)ivars->metadata, folder, filename);
@@ -209,8 +209,8 @@ Seg_Store_Metadata_IMP(Segment *self, const String *key, Obj *value) {
 }
 
 void
-Seg_Store_Metadata_Str_IMP(Segment *self, const char *key, size_t key_len,
-                           Obj *value) {
+Seg_Store_Metadata_Utf8_IMP(Segment *self, const char *key, size_t key_len,
+                            Obj *value) {
     StackString *k = SSTR_WRAP_STR((char*)key, key_len);
     Seg_Store_Metadata(self, (String*)k, value);
 }
@@ -222,9 +222,9 @@ Seg_Fetch_Metadata_IMP(Segment *self, const String *key) {
 }
 
 Obj*
-Seg_Fetch_Metadata_Str_IMP(Segment *self, const char *key, size_t len) {
+Seg_Fetch_Metadata_Utf8_IMP(Segment *self, const char *key, size_t len) {
     SegmentIVARS *const ivars = Seg_IVARS(self);
-    return Hash_Fetch_Str(ivars->metadata, key, len);
+    return Hash_Fetch_Utf8(ivars->metadata, key, len);
 }
 
 Hash*

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/Segment.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Segment.cfh b/core/Lucy/Index/Segment.cfh
index 3231938..43ca509 100644
--- a/core/Lucy/Index/Segment.cfh
+++ b/core/Lucy/Index/Segment.cfh
@@ -77,8 +77,8 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
                    decremented Obj *metadata);
 
     void
-    Store_Metadata_Str(Segment *self, const char *key, size_t len,
-                       decremented Obj *value);
+    Store_Metadata_Utf8(Segment *self, const char *key, size_t len,
+                        decremented Obj *value);
 
     /** Fetch a value from the Segment's metadata hash.
      */
@@ -86,7 +86,7 @@ public class Lucy::Index::Segment cnick Seg inherits Clownfish::Obj {
     Fetch_Metadata(Segment *self, const String *key);
 
     nullable Obj*
-    Fetch_Metadata_Str(Segment *self, const char *key, size_t len);
+    Fetch_Metadata_Utf8(Segment *self, const char *key, size_t len);
 
     /** Given a field name, return its field number for this segment (which
      * may differ from its number in other segments).  Return 0 (an invalid

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/Similarity.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Similarity.c b/core/Lucy/Index/Similarity.c
index ddfbcf5..c43d9b4 100644
--- a/core/Lucy/Index/Similarity.c
+++ b/core/Lucy/Index/Similarity.c
@@ -83,8 +83,8 @@ Sim_Get_Norm_Decoder_IMP(Similarity *self) {
 Obj*
 Sim_Dump_IMP(Similarity *self) {
     Hash *dump = Hash_new(0);
-    Hash_Store_Str(dump, "_class", 6,
-                   (Obj*)Str_Clone(Sim_Get_Class_Name(self)));
+    Hash_Store_Utf8(dump, "_class", 6,
+                    (Obj*)Str_Clone(Sim_Get_Class_Name(self)));
     return (Obj*)dump;
 }
 
@@ -92,7 +92,7 @@ Similarity*
 Sim_Load_IMP(Similarity *self, Obj *dump) {
     Hash *source = (Hash*)CERTIFY(dump, HASH);
     String *class_name 
-        = (String*)CERTIFY(Hash_Fetch_Str(source, "_class", 6), STRING);
+        = (String*)CERTIFY(Hash_Fetch_Utf8(source, "_class", 6), STRING);
     VTable *vtable = VTable_singleton(class_name, NULL);
     Similarity *loaded = (Similarity*)VTable_Make_Obj(vtable);
     UNUSED_VAR(self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/c3ccd8cd/core/Lucy/Index/Snapshot.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Index/Snapshot.c b/core/Lucy/Index/Snapshot.c
index 5ea097d..a8b2afe 100644
--- a/core/Lucy/Index/Snapshot.c
+++ b/core/Lucy/Index/Snapshot.c
@@ -114,9 +114,9 @@ Snapshot_Read_File_IMP(Snapshot *self, Folder *folder, const String *path) {
         Hash *snap_data
             = (Hash*)CERTIFY(Json_slurp_json(folder, ivars->path), HASH);
         Obj *format_obj
-            = CERTIFY(Hash_Fetch_Str(snap_data, "format", 6), OBJ);
+            = CERTIFY(Hash_Fetch_Utf8(snap_data, "format", 6), OBJ);
         int32_t format = (int32_t)Obj_To_I64(format_obj);
-        Obj *subformat_obj = Hash_Fetch_Str(snap_data, "subformat", 9);
+        Obj *subformat_obj = Hash_Fetch_Utf8(snap_data, "subformat", 9);
         int32_t subformat = subformat_obj
                             ? (int32_t)Obj_To_I64(subformat_obj)
                             : 0;
@@ -129,7 +129,7 @@ Snapshot_Read_File_IMP(Snapshot *self, Folder *folder, const String *path) {
 
         // Build up list of entries.
         VArray *list = (VArray*)CERTIFY(
-                           Hash_Fetch_Str(snap_data, "entries", 7),
+                           Hash_Fetch_Utf8(snap_data, "entries", 7),
                            VARRAY);
         INCREF(list);
         if (format == 1 || (format == 2 && subformat < 1)) {
@@ -160,7 +160,7 @@ S_clean_segment_contents(VArray *orig) {
     for (uint32_t i = 0, max = VA_Get_Size(orig); i < max; i++) {
         String *name = (String*)VA_Fetch(orig, i);
         if (!Seg_valid_seg_name(name)) {
-            if (Str_Starts_With_Str(name, "seg_", 4)) {
+            if (Str_Starts_With_Utf8(name, "seg_", 4)) {
                 continue;  // Skip this file.
             }
         }
@@ -197,13 +197,13 @@ Snapshot_Write_File_IMP(Snapshot *self, Folder *folder, const String *path) {
 
     // Sort, then store file names.
     VA_Sort(list, NULL, NULL);
-    Hash_Store_Str(all_data, "entries", 7, (Obj*)list);
+    Hash_Store_Utf8(all_data, "entries", 7, (Obj*)list);
 
     // Create a JSON-izable data structure.
-    Hash_Store_Str(all_data, "format", 6,
-                   (Obj*)Str_newf("%i32", (int32_t)Snapshot_current_file_format));
-    Hash_Store_Str(all_data, "subformat", 9,
-                   (Obj*)Str_newf("%i32", (int32_t)Snapshot_current_file_subformat));
+    Hash_Store_Utf8(all_data, "format", 6,
+                    (Obj*)Str_newf("%i32", (int32_t)Snapshot_current_file_format));
+    Hash_Store_Utf8(all_data, "subformat", 9,
+                    (Obj*)Str_newf("%i32", (int32_t)Snapshot_current_file_subformat));
 
     // Write out JSON-ized data to the new file.
     Json_spew_json((Obj*)all_data, folder, ivars->path);


Mime
View raw message