diff --git a/hl7/containers.py b/hl7/containers.py
index 231e3b1..a57f570 100644
--- a/hl7/containers.py
+++ b/hl7/containers.py
@@ -319,7 +319,7 @@ class Message(Container):
             elif c in DEFAULT_MAP:
                 rv.append(esc + DEFAULT_MAP[c] + esc)
             elif ord(c) >= 0x20 and ord(c) <= 0x7E:
-                rv.append(c.encode('ascii'))
+                rv.append(c)
             else:
                 rv.append('%sX%2x%s' % (esc, ord(c), esc))
 

Buggy ASCII escaping
If you escape a string containing any ASCII characters, this will lead to a `TypeError`:

``` python
import hl7

msg = hl7.Message(separator='\r', separators='\r|^~\&')
msg.escape('asdf')
```

``` plain
Traceback (most recent call last):
  File "hl7/__init__.py", line 630, in escape
    return ''.join(rv)
TypeError: sequence item 0: expected str instance, bytes found
```

diff --git a/tests/test_parse.py b/tests/test_parse.py
index e7ad1d4..dfed995 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -172,13 +172,19 @@ class ParseTest(unittest.TestCase):
     def test_escape(self):
         msg = hl7.parse(rep_sample_hl7)
 
+        # Escape Separators
         self.assertEqual(msg.escape('\\'), '\\E\\')
         self.assertEqual(msg.escape('|'), '\\F\\')
         self.assertEqual(msg.escape('^'), '\\S\\')
         self.assertEqual(msg.escape('&'), '\\T\\')
         self.assertEqual(msg.escape('~'), '\\R\\')
 
+        # Escape ASCII characters
+        self.assertEqual(msg.escape('asdf'), 'asdf')
+
+        # Escape non-ASCII characters
         self.assertEqual(msg.escape('áéíóú'), '\\Xe1\\\\Xe9\\\\Xed\\\\Xf3\\\\Xfa\\')
+        self.assertEqual(msg.escape('äsdf'), '\\Xe4\\sdf')
 
     def test_file(self):
         # Extract message from file

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
distlib==0.3.9
docutils==0.21.2
exceptiongroup==1.2.2
filelock==3.18.0
flake8==2.1.0
-e git+https://github.com/johnpaulett/python-hl7.git@253b2071aa376e7f37854b30e38fc6a0ab5c203d#egg=hl7
iniconfig==2.1.0
Jinja2==3.1.6
MarkupSafe==3.0.2
mccabe==0.7.0
packaging==24.2
pep8==1.7.1
platformdirs==4.3.7
pluggy==1.5.0
py==1.11.0
pyflakes==3.3.2
Pygments==2.19.1
pytest==8.3.5
six==1.17.0
Sphinx==1.2.1
tomli==2.2.1
tox==1.7.0
virtualenv==20.30.0

name: python-hl7
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - distlib==0.3.9
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - flake8==2.1.0
      - iniconfig==2.1.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - mccabe==0.7.0
      - packaging==24.2
      - pep8==1.7.1
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - py==1.11.0
      - pyflakes==3.3.2
      - pygments==2.19.1
      - pytest==8.3.5
      - six==1.17.0
      - sphinx==1.2.1
      - tomli==2.2.1
      - tox==1.7.0
      - virtualenv==20.30.0
prefix: /opt/conda/envs/python-hl7

tests/test_parse.py::ParseTest::test_escape
tests/test_parse.py::ParseTest::test_assign tests/test_parse.py::ParseTest::test_bytestring_converted_to_unicode tests/test_parse.py::ParseTest::test_elementnumbering tests/test_parse.py::ParseTest::test_empty_initial_repetition tests/test_parse.py::ParseTest::test_extract tests/test_parse.py::ParseTest::test_file tests/test_parse.py::ParseTest::test_non_ascii_bytestring tests/test_parse.py::ParseTest::test_non_ascii_bytestring_no_encoding tests/test_parse.py::ParseTest::test_nonstandard_separators tests/test_parse.py::ParseTest::test_parse tests/test_parse.py::ParseTest::test_parsing_classes tests/test_parse.py::ParseTest::test_repetition tests/test_parse.py::ParseTest::test_subcomponent tests/test_parse.py::ParseTest::test_unescape tests/test_parse.py::ParsePlanTest::test_create_parse_plan tests/test_parse.py::ParsePlanTest::test_parse_plan tests/test_parse.py::ParsePlanTest::test_parse_plan_next
hl7/containers.py
hl7/containers.py