@@ -172,15 +172,15 @@ int zusf_read_from_uss_file(ZUSF *zusf, string file, string &response)
172
172
in.close ();
173
173
174
174
char tagged_encoding[16 ] = {0 };
175
- ssize_t xattr_result = getxattr (file.c_str (), " system.filetag" , &zusf->encoding );
175
+ // ssize_t xattr_result = getxattr(file.c_str(), "system.filetag", &zusf->encoding);
176
176
177
177
const bool encodingProvided = strlen (zusf->encoding ) > 0 ;
178
178
179
179
char *bufEnd;
180
- if (encodingProvided || xattr_result > 0 && strlen (tagged_encoding) > 0 /* && (*encoding != "IBM-1047" && *encoding != "01047") */ )
180
+ if (encodingProvided /* && (*encoding != "IBM-1047" && *encoding != "01047") */ )
181
181
{
182
- const encoding = encodingProvided ? string (zusf->encoding ) : string (tagged_encoding);
183
- char *outBuf = zut_encode_alloc (rawData, size, encoding, zds ->diag , &bufEnd);
182
+ // const encoding = encodingProvided ? string(zusf->encoding) : string(tagged_encoding);
183
+ char *outBuf = zut_encode_alloc (rawData, size, string (zusf-> encoding ), zusf ->diag , &bufEnd);
184
184
if (outBuf)
185
185
{
186
186
response.clear ();
@@ -217,7 +217,7 @@ int zds_write_to_uss_file(ZUSF *zusf, string file, string &data)
217
217
if (strlen (zusf->encoding ) > 0 )
218
218
{
219
219
char *bufEnd;
220
- char *outBuf = zut_encode_alloc (data.c_str (), data.length (), string (zusf->encoding ), zusf->diag , &bufEnd);
220
+ char *outBuf = zut_encode_alloc (( char *) data.c_str (), data.length (), string (zusf->encoding ), zusf->diag , &bufEnd);
221
221
if (outBuf)
222
222
{
223
223
data.clear ();
0 commit comments