MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Transcode

Method Transcode

tensorflow/core/kernels/unicode_ops.cc:333–343  ·  view source on GitHub ↗

Transcode the string from input encoding to the output_encoding_. If non-valid characters are encountered, use the subst_/elide_replacement_ config to handle them.

Source from the content-addressed store, hash-verified

331 // non-valid characters are encountered, use the subst_/elide_replacement_
332 // config to handle them.
333 void Transcode(string* s, UConverter* input_encoder,
334 bool* found_any_format_error) {
335 icu::UnicodeString source;
336 IterateUnicodeString(
337 *s, input_encoder,
338 std::bind(&UnicodeTranscodeOp::TranslateCodepoints, this, &source,
339 found_any_format_error, std::placeholders::_1,
340 std::placeholders::_2, std::placeholders::_3));
341
342 Encode(output_encoding_, source, s);
343 }
344
345 string input_encoding_;
346 ErrorOptions error_options_;

Callers

nothing calls this directly

Calls 2

IterateUnicodeStringFunction · 0.85
EncodeFunction · 0.70

Tested by

no test coverage detected