dongyan3018 2015-06-16 23:06
浏览 48

php fwrite不会创建文件名,因为它们是导入的(ÅÄÖ变成ääÃ)

I'm using a form to send a subject and a message. I then remove all spaces from the subject using $subject = str_replace(" ", "_", $subject);

I then create a file using $file = fopen($subject, wb) The filename doesn't support the characters Å Ä and Ö. Instead they become ä ä and ö

When i echo $subject; it comes out normal.

I would prefer not having to replace them since I'm making a website for Swedish speaking people.

  • 写回答

1条回答 默认 最新

  • duanshan1511 2015-06-16 23:12
    关注

    Make sure your PHP file is properly encoded. I reckon it should be UTF8 but not sure for Swedish.

    评论

报告相同问题?

悬赏问题

  • ¥15 yolov8边框坐标
  • ¥15 matlab中使用gurobi时报错
  • ¥15 WPF 大屏看板表格背景图片设置
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真