diff --git a/imageio/core/request.py b/imageio/core/request.py
index d24e259..d2ddae2 100644
--- a/imageio/core/request.py
+++ b/imageio/core/request.py
@@ -244,8 +244,11 @@ class Request(object):
 
         # Set extension
         if self._filename is not None:
-            parts = urlparse(self._filename)
-            ext = Path(parts.path).suffix.lower()
+            if self._uri_type in (URI_FILENAME, URI_ZIPPED):
+                path = self._filename
+            else:
+                path = urlparse(self._filename).path
+            ext = Path(path).suffix.lower()
             self._extension = ext if ext != "" else None
 
     def _parse_uri(self, uri):

diff --git a/tests/test_core.py b/tests/test_core.py
index bcb584e..9700f5e 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -783,6 +783,21 @@ def test_imwrite_not_array_like():
         imageio.imwrite("foo.bmp", "asd")
 
 
+def test_imwrite_symbol_name():
+    # this is a regression test for https://github.com/imageio/imageio/issues/674
+    if sys.platform == "linux":
+        name = """#!~:@$%^&`-+{};',.()? []_=.jpg"""
+    elif sys.platform == "win32":
+        name = """#!~@$%^&`-+{};',.() []_=.jpg"""
+    elif sys.platform == "darwin":
+        name = """#!~@$%^&`-+{};',.()? []_=.jpg"""
+    else:
+        pytest.skip("Unknown OS.")
+    tmp_request = imageio.core.Request(name, "w")
+    assert tmp_request.extension == ".jpg"
+    tmp_request.finish()
+
+
 def test_legacy_empty_image():
     with pytest.raises(RuntimeError):
         with iio.imopen("foo.bmp", "wI", format="GIF-PIL") as file:

imageiov2.10.1. The imwrite will raise ValueError when filename include "#".
Imageio V2.10.1
```
import imageio
import numpy as np

imageio.imwrite('#1.jpg', np.zeros([512, 512, 3], dtype=np.uint8))
```
It will raise ValueError: Could not find a format to read the specified file in ImageMode.single_image mode.

But it will good. No raise.
```
imageio.imwrite('#1.jpg', np.zeros([512, 512, 3], dtype=np.uint8), '.jpg')
```
tests/test_core.py::test_imwrite_symbol_name
tests/test_core.py::test_fetching tests/test_core.py::test_request tests/test_core.py::test_request_read_sources tests/test_core.py::test_request_save_sources tests/test_core.py::test_request_seekable_file_object tests/test_core.py::test_request_file_no_seek tests/test_core.py::test_util_dict tests/test_core.py::test_util_get_platform tests/test_core.py::test_util_asarray tests/test_core.py::test_util_progres_bar tests/test_core.py::test_util_image_as_uint tests/test_core.py::test_util_has_has_module tests/test_core.py::test_to_nbytes_correct[1-1_0] tests/test_core.py::test_to_nbytes_correct[1-1_1] tests/test_core.py::test_to_nbytes_correct[8B-8] tests/test_core.py::test_to_nbytes_correct[1MB-1000000] tests/test_core.py::test_to_nbytes_correct[1M-1000000] tests/test_core.py::test_to_nbytes_correct[1GiB-1073741824] tests/test_core.py::test_to_nbytes_correct[1.5TB-1500000000000.0] tests/test_core.py::test_to_nbytes_incorrect[1mb] tests/test_core.py::test_to_nbytes_incorrect[1Giib] tests/test_core.py::test_to_nbytes_incorrect[GB] tests/test_core.py::test_to_nbytes_incorrect[1.3.2TB] tests/test_core.py::test_to_nbytes_incorrect[8b] tests/test_core.py::test_example_plugin tests/test_core.py::test_imwrite_not_subclass tests/test_core.py::test_imwrite_not_array_like tests/test_core.py::test_legacy_empty_image tests/test_core.py::test_imopen_unsupported_iomode tests/test_core.py::test_imopen_no_plugin_found tests/test_core.py::test_imopen_unregistered_plugin[.jpg] tests/test_core.py::test_plugin_selection_failure tests/test_core.py::test_plugin_selection_success[.jpg] tests/test_core.py::test_legacy_object_image_writing tests/test_core.py::test_request_mode_backwards_compatibility tests/test_core.py::test_faulty_legacy_mode_access tests/test_core.py::test_mvolread_out_of_bytes tests/test_core.py::test_invalid_explicit_plugin