Skip to content

Commit

Permalink
Merge pull request #120 from honginho/honginho-create-encoder
Browse files Browse the repository at this point in the history
Create encoder: MbConvertEncodingEncoder
  • Loading branch information
gam6itko authored Dec 19, 2022
2 parents e818e35 + d95a251 commit 68fe008
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/DataConverter/Encoder/MbConvertEncodingEncoder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php declare(strict_types=1);

namespace XBase\DataConverter\Encoder;

class MbConvertEncodingEncoder implements EncoderInterface
{
public function encode(string $string, string $fromEncoding, string $toEncoding): string
{
return mb_convert_encoding($string, $toEncoding, $fromEncoding);
}
}

0 comments on commit 68fe008

Please sign in to comment.